/* Poubel Home: as 46 transicoes do transitions.dev, instaladas no projeto.
   Ordem: tokens de movimento (_root.css), 35 receitas de transitions-dev (01 a 35), 11 receitas de transitions-pro.
   Paleta fechada: toda cor que uma receita trazia foi trocada por var(--token) de tokens.css.
   Renomeadas para nao colidir: 33 text morph usa .t-tmorph; pro card stack usa .t-cstack e --cstack-*;
   pro organic shimmer usa .t-oshimmer e --oshimmer-*.
   Gerado a partir das receitas; ajustes do projeto ficam em app.css. */

:root {
  /* ── Motion tokens — shared scale ──────────────────────────────
     Reference these with var(--…) anywhere in your project. The
     transitions below ship literal values so each snippet works on
     its own; `transitions refine` maps hardcoded values back to
     these tokens. */
  /* Durations */
  --duration-stagger: 40ms;  /* per-item stagger offset */
  --duration-micro: 80ms;  /* tooltip/path delay, shake segment, large stagger */
  --duration-quick: 150ms;  /* modal/dropdown close, text swap, tooltip appear */
  --duration-fast: 250ms;  /* icon swap, dropdown/modal open, tabs sliding, page slide */
  --duration-medium: 350ms;  /* panel close, toast close */
  --duration-slow: 400ms;  /* panel open, skeleton content reveal, input clear */
  --duration-very-slow: 500ms;  /* emphasis moments, badge appear, text reveal, success check */
  /* Easings */
  --ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1);  /* modal/dropdown/panel open + close, page slide, resize, position change */
  --ease-in-out: ease-in-out;  /* icon swap, text swap, text reveal, skeleton reveal */
  --ease-out: ease-out;  /* tooltip open / close */
  --ease-linear: linear;  /* shimmer, skeleton pulse, spinner */
  --ease-bounce: cubic-bezier(0.34, 1.36, 0.64, 1);  /* badge pop open */
  --ease-bounce-strong: cubic-bezier(0.34, 3.85, 0.64, 1);  /* bouncy hover-out (avatar return) */
  /* Distances */
  --distance-micro: 4px;  /* text swap */
  --distance-small: 6px;  /* error shake (small segment) */
  --distance-base: 8px;  /* badge diagonal reveal, page slide, error shake (large segment) */
  --distance-medium: 12px;  /* text reveal */
  --distance-large: 30px;  /* check badge appear */
  /* Scales */
  --scale-large: 0.96;  /* modal open / close */
  --scale-medium: 0.97;  /* dropdown open */
  --scale-small: 0.98;  /* tooltip open */
  --scale-tiny: 0.99;  /* dropdown close */
  /* Blur */
  --blur-small: 2px;  /* panel reveal, icon swap, text swap, skeleton reveal, number pop-in */
  --blur-medium: 3px;  /* page slide, text reveal */
  --blur-large: 8px;  /* success check open */

  /* ── Variaveis das receitas (transitions-polish: apontam para o token de mesmo uso) ── */
  /* Card resize */
  --resize-dur: 300ms;
  --resize-ease: var(--ease-smooth-out);
  /* Number pop-in */
  --digit-dur: 500ms;
  --digit-distance: var(--distance-base);
  --digit-stagger: 70ms;
  --digit-blur: var(--blur-small);
  --digit-ease: cubic-bezier(0.34, 1.45, 0.64, 1);
  --digit-dir-x: 0;
  --digit-dir-y: 1;
  /* Notification badge */
  --badge-slide-dur: 260ms;
  --badge-pop-dur: var(--duration-very-slow);
  --badge-pop-close-dur: 180ms;
  --badge-fade-dur: 400ms;
  --badge-fade-close-dur: 180ms;
  --badge-blur: var(--blur-small);
  --badge-offset-x: -8.2px;
  --badge-offset-y: 12.4px;
  --badge-slide-ease: var(--ease-smooth-out);
  --badge-pop-ease: var(--ease-bounce);
  --badge-close-ease: cubic-bezier(0.4, 0, 0.2, 1);
  /* Text states swap */
  --text-swap-dur: var(--duration-quick);
  --text-swap-translate-y: var(--distance-micro);
  --text-swap-blur: var(--blur-small);
  --text-swap-ease: var(--ease-in-out);
  /* Menu dropdown */
  --dropdown-open-dur: var(--duration-fast);
  --dropdown-close-dur: var(--duration-quick);
  --dropdown-pre-scale: var(--scale-medium);
  --dropdown-closing-scale: var(--scale-tiny);
  --dropdown-ease: var(--ease-smooth-out);
  /* Modal open / close */
  --modal-open-dur: var(--duration-fast);
  --modal-close-dur: var(--duration-quick);
  --modal-scale: var(--scale-large);
  --modal-scale-close: var(--scale-large);
  --modal-ease: var(--ease-smooth-out);
  /* Panel reveal */
  --panel-open-dur: var(--duration-slow);
  --panel-close-dur: var(--duration-medium);
  --panel-translate-y: 100px;
  --panel-blur: var(--blur-small);
  --panel-ease: var(--ease-smooth-out);
  /* Page side-by-side */
  --page-slide-dur: var(--duration-fast);
  --page-fade-dur: var(--duration-fast);
  --page-slide-distance: var(--distance-base);
  --page-blur: var(--blur-medium);
  --page-stagger: 0ms;
  --page-exit-enabled: 1;
  --page-slide-ease: var(--ease-smooth-out);
  --page-fade-ease: var(--ease-smooth-out);
  /* Icon swap */
  --icon-swap-dur: var(--duration-fast);
  --icon-swap-blur: var(--blur-small);
  --icon-swap-start-scale: 0.25;
  --icon-swap-ease: var(--ease-in-out);
  /* Success check */
  --check-opacity-dur: var(--duration-very-slow);
  --check-rotate-dur: var(--duration-very-slow);
  --check-rotate-from: 80deg;
  --check-bob-dur: var(--duration-very-slow);
  --check-y-amount: var(--distance-large);
  --check-blur-dur: var(--duration-very-slow);
  --check-blur-from: var(--blur-large);
  --check-path-dur: var(--duration-very-slow);
  --check-path-delay: var(--duration-micro);
  --check-ease-out: var(--ease-smooth-out);
  --check-ease-opacity: var(--ease-smooth-out);
  --check-ease-rotate: var(--ease-smooth-out);
  --check-ease-bob: cubic-bezier(0.34, 1.35, 0.64, 1);
  --check-ease-path: var(--ease-smooth-out);
  /* Avatar group hover */
  --avatar-lift: -4px;
  --avatar-dur: 320ms;
  --avatar-scale: 1.05;
  --avatar-falloff: 0.45;
  --avatar-ease-in: var(--ease-smooth-out);
  --avatar-ease-out: var(--ease-bounce-strong);
  /* Error state shake */
  --shake-distance: var(--distance-small);
  --shake-overshoot: 4px;
  --shake-dur-a: var(--duration-micro);
  --shake-dur-b: 60ms;
  --shake-ease: var(--ease-smooth-out);
  --revert-hold: 3000ms;
  --revert-dur: 280ms;
  /* Input clear with dissolve */
  --clear-dur: 1000ms;
  --clear-out-dur: var(--duration-slow);
  --clear-in-dur: var(--duration-slow);
  --clear-out-fly: 12px;
  --clear-in-fly: 12px;
  --clear-out-ease: var(--ease-smooth-out);
  --clear-in-ease: var(--ease-smooth-out);
  --clear-blur: var(--blur-small);
  --glow-delay: 50ms;
  --glow-peak-at: 0.15;
  --glow-opacity: 0.42;
  --glow-spread: 1.5;
  /* Skeleton loader and reveal */
  --pulse-dur: 1000ms;
  --pulse-count: 1;
  --pulse-min: 0.5;
  --reveal-dur: var(--duration-slow);
  --reveal-blur: var(--blur-small);
  --reveal-ease: var(--ease-in-out);
  /* Shimmer text */
  --shimmer-dur: 2000ms;
  --shimmer-base: var(--texto-suave);
  --shimmer-highlight: var(--titulo);
  --shimmer-band: 400%;
  --shimmer-ease: var(--ease-linear);
  /* Tabs sliding */
  --tabs-dur: var(--duration-fast);
  --tabs-ease: var(--ease-smooth-out);
  --tabs-text-muted: var(--texto-suave);
  --tabs-text-active: var(--acento-forte);
  --tabs-bar-bg: var(--neutro-50);
  --tabs-pill-bg: var(--superficie);
  /* Tooltip open/close */
  --tt-in-dur: var(--duration-quick);
  --tt-out-dur: 50ms;
  --tt-scale: var(--scale-small);
  --tt-delay: var(--duration-micro);
  --tt-in-ease: var(--ease-out);
  --tt-out-ease: var(--ease-out);
  --tt-move-dur: 160ms;
  --tt-move-ease: var(--ease-smooth-out);
  --tt-bg: var(--superficie);
  --tt-fg: var(--texto);
  /* Texts reveal */
  --stagger-dur: var(--duration-very-slow);
  --stagger-distance: var(--distance-medium);
  --stagger-stagger: var(--duration-stagger);
  --stagger-blur: var(--blur-medium);
  --stagger-ease: var(--ease-smooth-out);
  /* Card hover tilt */
  --tilt-perspective: 1000px;
  --tilt-return: 1000ms;
  --tilt-return-ease: var(--ease-smooth-out);
  --tilt-follow: 400ms;
  --tilt-follow-ease: var(--ease-smooth-out);
  --tilt-glare-opacity: 0.32;
  --tilt-glare-fade: 300ms;
  --tilt-glare-ease: var(--ease-smooth-out);
  /* Plus to menu morph */
  --morph-open-dur: 350ms;
  --morph-close-dur: 250ms;
  --morph-ease: cubic-bezier(0.34, 1.25, 0.64, 1);
  --morph-close-ease: var(--ease-smooth-out);
  --morph-r-closed: 40px;
  --morph-r-open: 20px;
  --morph-fade-dur: 200ms;
  --morph-slide: 40px;
  --morph-rotate: 45deg;
  --morph-scale: 0.97;
  --morph-blur: var(--blur-small);
  /* Accordion expand */
  --acc-expand: var(--duration-fast);
  --acc-collapse: var(--duration-fast);
  --acc-chevron: var(--duration-fast);
  --acc-ease: var(--ease-smooth-out);
  /* Toast open / close */
  --toast-open: var(--duration-slow);
  --toast-close: var(--duration-medium);
  --toast-distance: 16px;
  --toast-blur: var(--blur-small);
  --toast-scale: 0.97;
  --toast-ease: var(--ease-smooth-out);
  /* Like button */
  --like-color: var(--perigo);
  --like-fill: 150ms;
  --like-pop: 350ms;
  --like-pop-ease: cubic-bezier(0.34, 1.96, 0.64, 1);
  --like-particle-dur: 600ms;
  --like-particle-dist: 20px;
  --like-particle-size: 2.5px;
  --like-ease: var(--ease-smooth-out);
  /* Learn more hover */
  --learn-shift: 2px;
  --learn-spread: 8deg;
  --learn-in: 350ms;
  --learn-out: 350ms;
  --learn-ease: var(--ease-smooth-out);
  /* Checkbox check */
  --check-box: 150ms;
  --check-draw: 350ms;
  --check-delay: 0ms;
  --check-uncheck: 150ms;
  --check-ease: var(--ease-smooth-out);
  /* Spinning counter */
  --reel-dur: 1400ms;
  --reel-cell: 30px;
  --reel-spin-blur: 3px;
  --reel-stagger: 90ms;
  --reel-ease: cubic-bezier(0.16, 1, 0.3, 1);
  /* Toggle */
  --toggle-dur: 350ms;
  --toggle-travel: 14.66px;
  --toggle-ov1: 1px;
  --toggle-ov2: 0px;
  --toggle-track: 0ms;
  --toggle-ease: cubic-bezier(0.34, 1.35, 0.64, 1);
  /* Thinking states */
  --think-hold: 2000ms;
  --think-swap: var(--duration-quick);
  --think-gap: 50ms;
  --think-distance: var(--distance-micro);
  --think-blur: var(--blur-small);
  --think-shimmer: 2000ms;
  --think-base: var(--texto-suave);
  --think-highlight: var(--titulo);
  --think-ease: var(--ease-in-out);
  /* Reasoning stream */
  --reason-hold: 840ms;
  --reason-step: 500ms;
  --reason-lines: 2;
  --reason-fade: 28px;
  --reason-ease: var(--ease-smooth-out);
  /* Streaming text */
  --stream-gap: 60ms;
  --stream-fade: 350ms;
  --stream-blur: 1px;
  --stream-ease: var(--ease-smooth-out);
  /* Matrix dot loader */
  --matrix-cycle: 1200ms;
  --matrix-base: var(--neutro-100);
  --matrix-active: var(--acento);
  --matrix-ease: var(--ease-in-out);
  /* Banner stacking */
  --stack-open: 350ms;
  --stack-close: 250ms;
  --stack-rise: 60px;
  --stack-blur: var(--blur-small);
  --stack-scale: 0.97;
  --stack-peek: 12px;
  --stack-spread-gap: 8px;
  --stack-depth-scale: 0.06;
  --stack-depth-fade: 0.4;
  --stack-depth1-blur: 1px;
  --stack-depth2-blur: 2px;
  --stack-ease: var(--ease-smooth-out);
}

/* variaveis: text morph */
:root {
  --text-morph-dur: 180ms;
  --text-morph-resize-dur: 240ms;
  --text-morph-blur: 2px;
  --text-morph-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* variaveis: text swap soft */
:root {
  --text-soft-dur: 200ms;
  --text-soft-blur: 2px;
  --text-soft-ease: ease-in-out;
  --text-soft-resize-dur: 240ms;
  --text-soft-resize-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* variaveis: donut chart */
:root {
  --chart-morph-dur: 400ms;
  --chart-morph-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --chart-gap: 3px;
  --chart-corner: 2px;
}

/* variaveis: card stack hover */
:root {
  --cstack-open-dur: 410ms;
  --cstack-open-ease: cubic-bezier(0.31, 2.34, 0.64, 1);
  --cstack-close-dur: 360ms;
  --cstack-close-ease: cubic-bezier(0.34, 1.9, 0.64, 1);
  --cstack-scale-dur: 610ms;
  --cstack-scale-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --cstack-scale: 1.04;
  --cstack-spread: 1.42;
  --cstack-rotation: 1;
}

/* variaveis: confetti burst */
:root {
  --confetti-count: 120;
  --confetti-gravity: 1300;
  --confetti-size: 8px;
  --confetti-sway: 16;
  --confetti-bounce: 0.3;
  --confetti-hold: 1600ms;
  --confetti-fade: 600ms;
}

/* variaveis: drag drop physics */
:root {
  --drop-zone-border: 2px;
  --drop-card-shadow:
    0 1px 2px 0 color-mix(in srgb, var(--azul-900) 15%, transparent),
    0 2px 6px 0 color-mix(in srgb, var(--azul-900) 10%, transparent),
    0 4px 20px 0 color-mix(in srgb, var(--azul-900) 15%, transparent);
  --drop-card-shadow-p3:
    0 1px 2px 0 color-mix(in srgb, var(--azul-900) 15%, transparent),
    0 2px 6px 0 color-mix(in srgb, var(--azul-900) 10%, transparent),
    0 4px 20px 0 color-mix(in srgb, var(--azul-900) 15%, transparent);
  --drop-card-shadow-off:
    0 1px 2px 0 transparent,
    0 2px 6px 0 transparent,
    0 4px 20px 0 transparent;
  --drop-lift-scale: 1.05;
  --drop-lift-dur: 200ms;
  --drop-tilt-max: 10;
  --drop-dur: 450ms;
  --drop-ease: cubic-bezier(0.34, 1.35, 0.64, 1);
  --drop-return-dur: 500ms;
  --drop-return-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
  --drop-morph-squash: 0.97;
  --drop-down-dur: 250ms;
  --drop-down-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --drop-up-dur: 450ms;
  --drop-up-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --drop-fade-in: 400ms;
  --drop-fade-ease: ease-in-out;
  --drop-puff-dur: 1500ms;
  --drop-puff-dist: 30;
  --drop-wave-count: 1;
  --drop-wave-width: 50;
  --drop-wave-falloff: 20;
  --drop-wave-opacity: 0.42;
  --drop-wave-delay: 0ms;
  --drop-wave-stagger: 150ms;
  --drop-wave-grow: 0.28;
  --drop-wave-gravity: 10px;
  --drop-smoke-freq-x: 0.046;
  --drop-smoke-freq-y: 0.046;
  --drop-smoke-warp: 30;
  --drop-smoke-blur: 5;
  --drop-hold: 1800ms;
  --drop-out-dur: 400ms;
  --drop-respawn-dur: 250ms;
}

/* variaveis: get pro button */
:root {
  --probtn-strength:  0.7;
  --probtn-core:      50%;
  --probtn-core-blur: 150%;
  --probtn-blur:      6px;
  --probtn-hue-dur:   4000ms;
  --probtn-drift-dur: 5000ms;
}

/* variaveis: gooey plus menu */
:root {
  --goo-open-dur: 350ms;
  --goo-open-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
  --goo-close-dur: 250ms;
  --goo-close-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --goo-stagger: 40ms;
  --goo-spread: 1;
  --goo-blur: 6;
  --goo-contrast: 18;
  --goo-icon-dur: 250ms;
  --goo-icon-rotate: 45deg;
  --goo-icon-ease: ease-in-out;
  --goo-anticip: 5px;
  --goo-anticip-dur: 700ms;
  --goo-anticip-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --goo-surface: var(--superficie);
  --goo-icon-color: var(--titulo);
}

/* variaveis: image gen placeholder */
:root {
  --imgen-dot:         1.5px;
  --imgen-pitch:       5px;
  --imgen-dot-color:   color-mix(in srgb, var(--azul-900) 28%, transparent);
  --imgen-cycle:       1400ms;
  --imgen-spread:      0.1;
  --imgen-phase:       6000ms;
  --imgen-scale-min:   0;
  --imgen-peak:        1;
  --imgen-ease:        ease-in-out;
  --imgen-reveal-dur:  650ms;
  --imgen-reveal-blur: 3px;
  --imgen-reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* variaveis: image open tilt */
:root {
  --opentilt-open-dur: 620ms;
  --opentilt-close-dur: 420ms;
  --opentilt-open-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --opentilt-close-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --opentilt-closed-scale: 0.3;
  --opentilt-tilt-x: 22deg;
  --opentilt-tilt-y: -14deg;
  --opentilt-lift: 70px;
  --opentilt-perspective: 900px;
  --opentilt-open-w: 320px;
  --opentilt-open-h: 240px;
  --opentilt-bend: 28;
  --opentilt-bend-dur: 300ms;
  --opentilt-bend-ease: ease-out;
}

/* variaveis: organic shimmer */
:root {
  --oshimmer-dur: 3000ms;
  --oshimmer-ease: ease-out;
  --oshimmer-band-span: 26%;
  --oshimmer-opacity: 1;
  --oshimmer-glow-blur: 20px;
  --oshimmer-glow-strength: 0.7;
  --oshimmer-ring-strength: 1;
  --oshimmer-scale: 1;
}

/* variaveis: pro gradient text */
:root {
  --gradient-text-hue-dur: 4000ms;
  --gradient-text-drift-dur: 5000ms;
}

/* variaveis: smoky dissolve */
:root {
  --smoky-size: 120px;
  --smoky-dur: 550ms;
  --smoky-gravity: 150;
  --smoky-warp: 30;
  --smoky-warp-dur: 2000ms;
  --smoky-warp-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --smoky-blur: 12px;
  --smoky-blur-ease: ease-in;
  --smoky-gravity-ease: ease-in;
  --smoky-dissolve-ease: ease-out;
  --smoky-sway: 0px;
  --smoky-spin: 3deg;
  --smoky-churn: 30;
  --smoky-spread: 0;
  --smoky-respawn: 800ms;
}

/* variaveis: spinner check morph */
:root {
  --check-spin-dur:    900ms;
  --check-pop-dur:     350ms;
  --check-pop-ease:    cubic-bezier(0.34, 1.96, 0.94, 1);
  --check-fill-dur:    350ms;  /* green disc fade-in */
  --check-fill-ease:   cubic-bezier(0.34, 1.35, 0.64, 1);
  --check-draw-dur:    600ms;
  --check-draw-delay:  80ms;
  --check-draw-ease:   cubic-bezier(0.22, 1, 0.36, 1);
  --check-hold:        2000ms; /* time on the check before reverting */
  --check-revert-dur:  250ms;
  --check-revert-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --check-hop:         3px;    /* how far the badge rises on the morph */
  --check-up-dur:      250ms;  /* hop UP: the rise */
  --check-up-ease:     cubic-bezier(0.34, 1.35, 0.64, 1);
  --check-down-dur:    300ms;  /* hop DOWN: the fall back */
  --check-down-ease:   cubic-bezier(0.14, 2.56, 0.94, 1);
  --check-pop-scale:   1.09;   /* done size (22 -> 24px disc) */
  --check-blur:        0.5px;  /* cross-blur while morphing */
  --check-ring-w:      2.5px;  /* spinner track + arc stroke weight */
  --check-mark-w:      2;      /* check draw stroke weight */
  --check-green:       var(--ok);
}

/* ==================== 01 · card resize ==================== */
.t-resize {
  transition:
    width  var(--resize-dur) var(--resize-ease),
    height var(--resize-dur) var(--resize-ease);
  will-change: width, height;
}

@media (prefers-reduced-motion: reduce) {
  .t-resize { transition: none !important; }
}

/* ==================== 02 · number pop in ==================== */
@keyframes t-digit-pop-in {
  0%   {
    transform: translate(
      calc(var(--digit-distance) * var(--digit-dir-x)),
      calc(var(--digit-distance) * var(--digit-dir-y))
    );
    opacity: 0;
    filter: blur(var(--digit-blur));
  }
  100% { transform: translate(0, 0); opacity: 1; filter: blur(0); }
}

.t-digit-group {
  display: inline-flex;
  align-items: baseline;
}
.t-digit {
  display: inline-block;
  will-change: transform, opacity, filter;
}
.t-digit-group.is-animating .t-digit {
  animation: t-digit-pop-in var(--digit-dur) var(--digit-ease) both;
}
.t-digit-group.is-animating .t-digit[data-stagger="1"] {
  animation-delay: var(--digit-stagger);
}
.t-digit-group.is-animating .t-digit[data-stagger="2"] {
  animation-delay: calc(var(--digit-stagger) * 2);
}
/* Digits that did not change (the leading ones the old and new number
   share) stay still; only the digits that changed pop in. */
.t-digit-group.is-animating .t-digit[data-same] {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .t-digit-group .t-digit { animation: none !important; }
}

/* ==================== 03 · notification badge ==================== */
@keyframes t-badge-slide-in {
  from { transform: translate(var(--badge-offset-x), var(--badge-offset-y)); }
  to   { transform: translate(0, 0); }
}

/* .t-badge is the absolutely-positioned wrapper for the dot.
   Adjust top/right (or left/bottom) to anchor it on your trigger. */
.t-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  pointer-events: none;
  will-change: transform;
}
.t-badge[data-open="true"] {
  animation: t-badge-slide-in var(--badge-slide-dur) var(--badge-slide-ease);
}

.t-badge-dot {
  display: block;
  transform-origin: center;
  transform: scale(1);
  opacity: 1;
  filter: blur(0);
  transition:
    transform var(--badge-pop-dur)  var(--badge-pop-ease),
    opacity   var(--badge-fade-dur) var(--badge-pop-ease),
    filter    var(--badge-pop-dur)  var(--badge-pop-ease);
  will-change: transform, opacity, filter;
}
.t-badge[data-open="false"] .t-badge-dot {
  transform: scale(0);
  opacity: 0;
  filter: blur(var(--badge-blur));
  transition:
    transform var(--badge-pop-close-dur)  var(--badge-close-ease),
    opacity   var(--badge-fade-close-dur) var(--badge-close-ease),
    filter    var(--badge-pop-close-dur)  var(--badge-close-ease);
}

@media (prefers-reduced-motion: reduce) {
  .t-badge, .t-badge-dot { animation: none !important; transition: none !important; }
}

/* ==================== 04 · text states swap ==================== */
.t-text-swap {
  display: inline-block;
  transform: translateY(0);
  filter: blur(0);
  opacity: 1;
  transition:
    transform var(--text-swap-dur) var(--text-swap-ease),
    filter    var(--text-swap-dur) var(--text-swap-ease),
    opacity   var(--text-swap-dur) var(--text-swap-ease);
  will-change: transform, filter, opacity;
}
.t-text-swap.is-exit {
  transform: translateY(calc(var(--text-swap-translate-y) * -1));
  filter: blur(var(--text-swap-blur));
  opacity: 0;
}
.t-text-swap.is-enter-start {
  transform: translateY(var(--text-swap-translate-y));
  filter: blur(var(--text-swap-blur));
  opacity: 0;
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .t-text-swap { transition: none !important; }
}

/* ==================== 05 · menu dropdown ==================== */
.t-dropdown {
  transform-origin: top left;
  transform: scale(var(--dropdown-pre-scale));
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--dropdown-open-dur) var(--dropdown-ease),
    opacity   var(--dropdown-open-dur) var(--dropdown-ease);
  will-change: transform, opacity;
}
.t-dropdown[data-origin="top-right"]     { transform-origin: top right; }
.t-dropdown[data-origin="top-center"]    { transform-origin: top center; }
.t-dropdown[data-origin="bottom-left"]   { transform-origin: bottom left; }
.t-dropdown[data-origin="bottom-center"] { transform-origin: bottom center; }
.t-dropdown[data-origin="bottom-right"]  { transform-origin: bottom right; }

.t-dropdown.is-open {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}
.t-dropdown.is-closing {
  transform: scale(var(--dropdown-closing-scale));
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--dropdown-close-dur) var(--dropdown-ease),
    opacity   var(--dropdown-close-dur) var(--dropdown-ease);
}

@media (prefers-reduced-motion: reduce) {
  .t-dropdown { transition: none !important; }
}

/* ==================== 06 · modal ==================== */
.t-modal {
  transform-origin: center;
  transform: scale(var(--modal-scale));
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--modal-open-dur) var(--modal-ease),
    opacity   var(--modal-open-dur) var(--modal-ease);
  will-change: transform, opacity;
}
.t-modal.is-open {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}
.t-modal.is-closing {
  transform: scale(var(--modal-scale-close));
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--modal-close-dur) var(--modal-ease),
    opacity   var(--modal-close-dur) var(--modal-ease);
}

@media (prefers-reduced-motion: reduce) {
  .t-modal { transition: none !important; }
}

/* ==================== 07 · panel reveal ==================== */
.t-panel-slide {
  transform: translateY(var(--panel-translate-y));
  opacity: 0;
  filter: blur(var(--panel-blur));
  pointer-events: none;
  transition:
    transform var(--panel-close-dur) var(--panel-ease),
    opacity   var(--panel-close-dur) var(--panel-ease),
    filter    var(--panel-close-dur) var(--panel-ease);
  will-change: transform, opacity, filter;
}
.t-panel-slide[data-open="true"] {
  transform: translateY(0);
  opacity: 1;
  filter: blur(0);
  pointer-events: auto;
  transition:
    transform var(--panel-open-dur) var(--panel-ease),
    opacity   var(--panel-open-dur) var(--panel-ease),
    filter    var(--panel-open-dur) var(--panel-ease);
}

@media (prefers-reduced-motion: reduce) {
  .t-panel-slide { transition: none !important; }
}

/* ==================== 08 · page side by side ==================== */
.t-page-slide {
  position: relative;
}
.t-page-slide .t-page[data-page-id="1"] {
  --t-page-from-x: calc(var(--page-slide-distance) * -1);
}
.t-page-slide .t-page[data-page-id="2"] {
  --t-page-from-x: var(--page-slide-distance);
}
.t-page-slide .t-page {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(var(--t-page-from-x, 0px) * var(--page-exit-enabled)));
  filter: blur(calc(var(--page-blur) * var(--page-exit-enabled)));
  transition:
    opacity   var(--page-fade-dur)  var(--page-fade-ease),
    transform var(--page-slide-dur) var(--page-slide-ease),
    filter    var(--page-slide-dur) var(--page-slide-ease);
  will-change: opacity, transform, filter;
}
.t-page-slide[data-page="1"] .t-page[data-page-id="1"],
.t-page-slide[data-page="2"] .t-page[data-page-id="2"] {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  filter: blur(0);
  transition-delay: var(--page-stagger);
}

@media (prefers-reduced-motion: reduce) {
  .t-page-slide .t-page { transition: none !important; }
}

/* ==================== 09 · icon swap ==================== */
.t-icon-swap {
  position: relative;
  display: inline-grid;
}
.t-icon-swap .t-icon {
  grid-area: 1 / 1;
  transition:
    opacity   var(--icon-swap-dur) var(--icon-swap-ease),
    filter    var(--icon-swap-dur) var(--icon-swap-ease),
    transform var(--icon-swap-dur) var(--icon-swap-ease);
  /* No will-change: it would freeze each icon's raster at its 0.25 start
     scale, so a large icon scales up blurry and pixelated. */
}
.t-icon-swap[data-state="a"] .t-icon[data-icon="a"],
.t-icon-swap[data-state="b"] .t-icon[data-icon="b"] {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
}
.t-icon-swap[data-state="a"] .t-icon[data-icon="b"],
.t-icon-swap[data-state="b"] .t-icon[data-icon="a"] {
  opacity: 0;
  filter: blur(var(--icon-swap-blur));
  transform: scale(var(--icon-swap-start-scale));
}

@media (prefers-reduced-motion: reduce) {
  .t-icon-swap .t-icon { transition: none !important; }
}

/* ==================== 10 · success check ==================== */
/* Wrapper drives the appear animation; it doesn't own any
   sizing or color so you can drop in any icon. */
.t-success-check {
  display: inline-block;
  transform-origin: center;
  opacity: 0;
  will-change: transform, opacity, filter;
}
/* overflow: visible keeps the stroke from clipping while it
   draws; display: block kills the inline whitespace under SVGs. */
.t-success-check svg { display: block; overflow: visible; }
/* Stroke-draw setup. Replace 20 with the result of
   path.getTotalLength() for your path; round caps mean any
   sub-pixel overshoot is invisible. */
.t-success-check svg path {
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
}

.t-success-check[data-state="in"] {
  animation:
    t-check-fade   var(--check-opacity-dur) var(--check-ease-opacity) forwards,
    t-check-rotate var(--check-rotate-dur)  var(--check-ease-rotate)  forwards,
    t-check-blur   var(--check-blur-dur)    var(--check-ease-out)     forwards,
    t-check-bob    var(--check-bob-dur)     var(--check-ease-bob)     forwards;
}
.t-success-check[data-state="in"] svg path {
  animation: t-check-draw var(--check-path-dur) var(--check-ease-path) var(--check-path-delay, 0ms) forwards;
}

@keyframes t-check-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes t-check-rotate {
  from { transform: rotate(var(--check-rotate-from)); }
  to   { transform: rotate(0deg); }
}
@keyframes t-check-blur {
  from { filter: blur(var(--check-blur-from)); }
  to   { filter: blur(0); }
}
@keyframes t-check-bob {
  from { translate: 0 var(--check-y-amount); }
  to   { translate: 0 0; }
}
@keyframes t-check-draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .t-success-check { animation: none !important; opacity: 1; }
  .t-success-check svg path { animation: none !important; stroke-dashoffset: 0 !important; }
}

/* ==================== 11 · avatar group hover ==================== */
/* Hover-spring transition only — bring your own avatar/chip
   styling (size, shape, border, stacking, background). */
.t-avatar {
  transform-origin: center;
  /* translateY before scale so scale doesn't amplify the lift offset. */
  transform:
    translateY(var(--shift, 0px))
    scale(var(--scale-active, 1));
  transition: transform var(--avatar-dur) var(--avatar-ease-in);
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .t-avatar { transition: none !important; transform: none !important; }
}

/* ==================== 12 · error state shake ==================== */
/* Border-color tween. Define your input's default / focused
   / error border-color in your own component CSS — this rule
   only owns the interpolation. Use a constant border-width
   across states so the tween never shifts inner content. */
.t-input {
  transition: border-color 150ms ease-out;
  will-change: transform;
}
.t-input.is-error {
  /* Error border auto-reverts on the hold timer, so the
     fade-out uses the slower revert duration (matches the
     message fade). */
  transition: border-color var(--revert-dur, 280ms) ease-out;
}

/* Error message reveal. Visibility is delayed by --revert-dur
   on hide so the message stays painted for the full opacity
   fade-out. Entering .is-error drops the delay to 0 so the
   message becomes visible immediately. */
.t-error-msg {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity    var(--revert-dur, 280ms) ease-out,
    visibility 0s linear var(--revert-dur, 280ms);
}
.t-input-wrap.is-error .t-error-msg {
  opacity: 1;
  visibility: visible;
  transition:
    opacity    var(--revert-dur, 280ms) ease-out,
    visibility 0s linear 0s;
}

/* Multi-segment keyframe with per-stop easing so each leg
   of the shake follows its own cubic-bezier independently.
   %-stops are cumulative durations as a fraction of the
   total (80, 60, 80, 60 = 280ms): 28.57%, 57.14%, 78.57%,
   100%. Recompute if any segment duration changes. */
.t-input.is-shaking {
  animation: t-input-shake calc(
      var(--shake-dur-a) * 2 + var(--shake-dur-b) * 2
    ) linear;
}
@keyframes t-input-shake {
  0%      { transform: translateX(0);                                 animation-timing-function: var(--shake-ease); }
  28.57%  { transform: translateX(var(--shake-distance));             animation-timing-function: var(--shake-ease); }
  57.14%  { transform: translateX(calc(var(--shake-distance) * -1)); animation-timing-function: var(--shake-ease); }
  78.57%  { transform: translateX(var(--shake-overshoot));            animation-timing-function: var(--shake-ease); }
  100%    { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .t-input { animation: none !important; transform: none !important; }
}

/* ==================== 13 · input clear dissolve ==================== */
/* The wrap clips the glow to its rounded box. The hairline
   border is `inset` so it sits inside that clip — when the
   glow's mix-blend-mode darkens its area, the border
   underneath darkens with it. Bring your own width / height /
   border-radius / surface color. */
.t-clear {
  position: relative;
  overflow: hidden;
}
.t-clear-mirror,
.t-clear-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  z-index: 2;
}
.t-clear-mirror { opacity: 0; }
.t-clear.has-value .t-clear-mirror,
.t-clear.is-clearing .t-clear-mirror { opacity: 1; }
/* Hide the input's own glyphs while the mirror owns them so
   the cleared text doesn't double-render with the fly-up. */
.t-clear.has-value > input,
.t-clear.is-clearing > input {
  -webkit-text-fill-color: transparent;
}
.t-clear.has-value .t-clear-placeholder { opacity: 0; }
/* The streak overlay: empty by default; JS writes a stack of
   `radial-gradient(...)` layers into background during a clear,
   then animates opacity. mix-blend-mode: multiply darkens the
   underlying input + hairline; flip to `screen` in dark mode
   so the same alpha values lighten instead of vanish. */
.t-clear-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 3;
  mix-blend-mode: multiply;
}

/* The transitions live in JS (per-frame transform/opacity/
   filter writes), so this stylesheet only owns the resting
   state + the variables that JS reads. Read them with
   `parseFloat(getComputedStyle(root).getPropertyValue(...))`
   so live tweaks apply on the next clear without a reload. */

@media (prefers-reduced-motion: reduce) {
  .t-clear-glow { opacity: 0 !important; }
}

/* ==================== 14 · skeleton reveal ==================== */
/* The wrap stacks two layers on the same coordinates. The
   skeleton owns the cold pulse + the fade-out side of the
   reveal; the content owns the fade-in side. They share the
   same duration / ease so the swap reads as one motion. */
.t-skel { position: relative; }
.t-skel-skeleton,
.t-skel-content {
  position: absolute;
  inset: 0;
}

.t-skel-skeleton {
  z-index: 1;
  opacity: 1;
  filter: blur(0);
  transition:
    opacity var(--reveal-dur) var(--reveal-ease),
    filter  var(--reveal-dur) var(--reveal-ease);
}
.t-skel-content {
  z-index: 2;
  opacity: 0;
  filter: blur(var(--reveal-blur));
  transition:
    opacity var(--reveal-dur) var(--reveal-ease),
    filter  var(--reveal-dur) var(--reveal-ease);
}
.t-skel.is-revealed .t-skel-skeleton {
  opacity: 0;
  filter: blur(var(--reveal-blur));
}
.t-skel.is-revealed .t-skel-content {
  opacity: 1;
  filter: blur(0);
}
/* Snap-back when replaying: kill transitions so the reverse
   (revealed → skeleton) is instant. Drop `.is-resetting`
   after a forced reflow and the next reveal animates again. */
.t-skel.is-resetting .t-skel-skeleton,
.t-skel.is-resetting .t-skel-content {
  transition: none !important;
}

/* Pulse: place the animation on the bar/avatar children, not
   on the skeleton itself, so the skeleton's opacity / filter
   stay free for the cross-fade transition above. */
.t-skel-skeleton.is-pulsing > * {
  animation: t-skel-pulse var(--pulse-dur) ease-in-out var(--pulse-count);
}
@keyframes t-skel-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: var(--pulse-min); }
}

@media (prefers-reduced-motion: reduce) {
  .t-skel-skeleton, .t-skel-content {
    transition: none !important;
  }
  .t-skel-skeleton.is-pulsing > * { animation: none !important; }
}

/* ==================== 15 · shimmer text ==================== */
/* Two-layer construction:
   1. The base text renders normally in --shimmer-base.
   2. ::before duplicates it via content: attr(data-text),
      paints a transparent → highlight → transparent gradient
      onto it, and clips that gradient to the glyphs via
      background-clip: text. Animating background-position
      sweeps the band across the text. */
.t-shimmer {
  position: relative;
  display: inline-block;
  color: var(--shimmer-base);
}
.t-shimmer::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(
    90deg,
    transparent          0%,
    transparent         40%,
    var(--shimmer-highlight) 50%,
    transparent         60%,
    transparent        100%
  );
  background-size: var(--shimmer-band) 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: t-shimmer var(--shimmer-dur) var(--shimmer-ease) infinite;
}
@keyframes t-shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: 0% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .t-shimmer::before { animation: none !important; }
}

/* ==================== 16 · tabs sliding ==================== */
/* The bar is just a flex container with padding for the pill
   to sit inside. Tabs sit on z-index: 1, the pill on z-index: 0,
   so labels read above the pill background. */
.t-tabs {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border-radius: 48px;
  background: var(--tabs-bar-bg);
}
.t-tab {
  position: relative;
  appearance: none;
  border: 0;
  background: transparent;
  height: 30px;
  padding: 4px 12px;
  color: var(--tabs-text-muted);
  cursor: pointer;
  border-radius: 48px;
  z-index: 1;
  transition: color var(--tabs-dur) var(--tabs-ease);
}
.t-tab:not([aria-selected="true"]):hover,
.t-tab[aria-selected="true"] {
  color: var(--tabs-text-active);
}

/* The pill: width + transform are written inline by JS so
   the transition tweens between the previous and next
   measured positions. */
.t-tabs-pill {
  position: absolute;
  top: 3px;
  left: 0;
  height: 30px;
  width: 0;
  background: var(--tabs-pill-bg);
  border-radius: 48px;
  transform: translateX(0);
  transition:
    transform var(--tabs-dur) var(--tabs-ease),
    width     var(--tabs-dur) var(--tabs-ease);
  will-change: transform, width;
  z-index: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .t-tabs-pill, .t-tab { transition: none !important; }
}

/* ==================== 17 · tooltip ==================== */
.t-tt-group {
  position: relative;
  display: inline-flex;
}
.t-tt {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0;                 /* the JS writes the measured width */
  overflow: hidden;
  /* Individual transform properties: the travel (translate) and the
     appear (scale) run on their own clocks. */
  translate: var(--tt-x, 0px) 0;
  scale: var(--tt-scale);
  transform-origin: 50% 100%;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--tt-bg);
  color: var(--tt-fg);
  white-space: nowrap;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--azul-900) 6%, transparent),
    0 2px 6px 0 color-mix(in srgb, var(--azul-900) 5%, transparent),
    0 4px 42px 0 color-mix(in srgb, var(--azul-900) 6%, transparent);
  opacity: 0;
  pointer-events: none;
  /* Default rule controls the LEAVE state: no delay, so hiding plays
     immediately. The move lanes are always live. */
  transition:
    opacity   var(--tt-out-dur) var(--tt-out-ease),
    scale     var(--tt-out-dur) var(--tt-out-ease),
    translate var(--tt-move-dur) var(--tt-move-ease),
    width     var(--tt-move-dur) var(--tt-move-ease);
}
/* The appear delay belongs ONLY to the show rule, so hiding snaps it
   back to 0. A retarget while showing carries no delay at all. */
.t-tt[data-show="true"] {
  opacity: 1;
  scale: 1;
  transition:
    opacity   var(--tt-in-dur) var(--tt-in-ease) var(--tt-delay),
    scale     var(--tt-in-dur) var(--tt-in-ease) var(--tt-delay),
    translate var(--tt-move-dur) var(--tt-move-ease),
    width     var(--tt-move-dur) var(--tt-move-ease);
}
.t-tt-text { white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .t-tt { transition: none !important; }
}

/* ==================== 18 · texts reveal ==================== */
/* Lines start translated down + blurred + invisible; .is-shown
   on the parent flips them to their resting state. The second
   line's transition-delay holds it back by --stagger-stagger
   so the eye lands on the headline first. */
.t-stagger-line {
  display: block;
  opacity: 0;
  transform: translateY(var(--stagger-distance));
  filter: blur(var(--stagger-blur));
  transition:
    opacity   var(--stagger-dur) var(--stagger-ease),
    transform var(--stagger-dur) var(--stagger-ease),
    filter    var(--stagger-dur) var(--stagger-ease);
  will-change: transform, opacity, filter;
}
.t-stagger-line--2 { transition-delay: var(--stagger-stagger); }

.t-stagger.is-shown .t-stagger-line {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
/* Exit decouples from the stagger: same fade for every line,
   no Y return, no blur — so the disappearance reads as a
   single quiet fade instead of a reverse reveal. */
.t-stagger.is-hiding .t-stagger-line {
  opacity: 0;
  transform: translateY(0);
  filter: blur(0);
  transition:
    opacity 200ms ease,
    transform 0s linear,
    filter 0s linear;
  transition-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
  .t-stagger-line { transition: none !important; }
}

/* ==================== 19 · card tilt ==================== */
/* The outer wrapper is the flat hit area; touch-action:none
   lets a finger drag tilt the card instead of scrolling the
   page, so tap-hold-drag works on mobile. */
.t-tilt { touch-action: none; }
/* The card tilts toward the pointer via rotateX/rotateY fed
   from JS; on leave it eases back to flat. A separate
   .is-tilting class swaps in a short linear follow while the
   pointer moves so the tilt tracks the cursor 1:1. */
.t-tilt-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  transform:
    perspective(var(--tilt-perspective))
    rotateX(var(--tilt-rx, 0deg))
    rotateY(var(--tilt-ry, 0deg));
  transform-style: preserve-3d;
  transition: transform var(--tilt-return) var(--tilt-return-ease);
  will-change: transform;
}
.t-tilt-card.is-tilting {
  transition: transform var(--tilt-follow) var(--tilt-follow-ease);
}
/* Cursor-tracked glare: layered soft circles that add like
   light (screen blend) at the pointer position. */
.t-tilt-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  background:
    radial-gradient(circle 95px at var(--tilt-gx, 50%) var(--tilt-gy, 50%),
      color-mix(in srgb, var(--neutro-0) 48%, transparent), color-mix(in srgb, var(--neutro-0) 6%, transparent) 52%, transparent 84%),
    radial-gradient(circle 200px at var(--tilt-gx, 50%) var(--tilt-gy, 50%),
      color-mix(in srgb, var(--neutro-0) 22%, transparent), color-mix(in srgb, var(--neutro-0) 4%, transparent) 58%, transparent 78%),
    radial-gradient(circle 360px at var(--tilt-gx, 50%) var(--tilt-gy, 50%),
      color-mix(in srgb, var(--neutro-0) 10%, transparent), transparent 88%);
  transition: opacity var(--tilt-glare-fade) var(--tilt-glare-ease);
}
.t-tilt.is-hover .t-tilt-glare { opacity: var(--tilt-glare-opacity); }

@media (prefers-reduced-motion: reduce) {
  .t-tilt-card { transform: none !important; transition: none !important; }
}

/* ==================== 20 · plus menu morph ==================== */
/* Closed: a small circular button. Open: a rounded panel.
   Width/height/border-radius animate; the open state uses a
   bouncier ease than the close. */
.t-morph {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--morph-r-closed);
  overflow: hidden;
  transition:
    width var(--morph-close-dur) var(--morph-close-ease),
    height var(--morph-close-dur) var(--morph-close-ease),
    border-radius var(--morph-close-dur) var(--morph-close-ease);
}
.t-morph[data-open="true"] {
  width: 183px;
  height: 172px;
  border-radius: var(--morph-r-open);
  transition:
    width var(--morph-open-dur) var(--morph-ease),
    height var(--morph-open-dur) var(--morph-ease),
    border-radius var(--morph-open-dur) var(--morph-ease);
}
/* Plus fades + slides out and the icon rotates into an ×. */
.t-morph-plus {
  position: absolute;
  inset: auto 0 0 auto;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 0; background: transparent; cursor: pointer;
  transition:
    opacity var(--morph-fade-dur) var(--morph-close-ease),
    transform var(--morph-open-dur) var(--morph-close-ease),
    filter var(--morph-fade-dur) var(--morph-close-ease);
}
.t-morph-plus svg {
  transition: transform var(--morph-open-dur) var(--morph-close-ease);
}
.t-morph[data-open="true"] .t-morph-plus {
  opacity: 0;
  transform: translateX(calc(-1 * var(--morph-slide)));
  filter: blur(var(--morph-blur));
  pointer-events: none;
}
.t-morph[data-open="true"] .t-morph-plus svg {
  transform: scale(var(--morph-scale)) rotate(var(--morph-rotate));
}
/* Menu starts slid in + scaled + blurred; reveals on open. */
.t-morph-menu {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(var(--morph-slide)) scale(var(--morph-scale));
  filter: blur(var(--morph-blur));
  pointer-events: none;
  transition:
    opacity var(--morph-fade-dur) var(--morph-close-ease),
    transform var(--morph-open-dur) var(--morph-close-ease),
    filter var(--morph-fade-dur) var(--morph-close-ease);
}
.t-morph[data-open="true"] .t-morph-menu {
  opacity: 1;
  transform: translateX(0) scale(1);
  filter: blur(0);
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .t-morph, .t-morph-plus, .t-morph-menu { transition: none !important; }
}

/* ==================== 21 · accordion ==================== */
/* grid-template-rows 0fr → 1fr gives a clean height animation
   with no JS measurement; the inner element clips overflow. */
.t-acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--acc-collapse) var(--acc-ease);
}
.t-acc[data-open="true"] .t-acc-panel {
  grid-template-rows: 1fr;
  transition: grid-template-rows var(--acc-expand) var(--acc-ease);
}
.t-acc-panel-inner {
  overflow: hidden;
  opacity: 0;
  filter: blur(2px);
  transition:
    opacity var(--acc-collapse) var(--acc-ease),
    filter var(--acc-collapse) var(--acc-ease);
}
.t-acc[data-open="true"] .t-acc-panel-inner {
  opacity: 1;
  filter: blur(0);
  transition:
    opacity var(--acc-expand) var(--acc-ease),
    filter var(--acc-expand) var(--acc-ease);
}
/* Flip the chevron vertically to turn the "v" into a "^".
   scaleY(-1) about the centre passes through a flat line at
   the midpoint (same look as a `d:` path morph) but animates
   in every browser, unlike CSS `d:` morphing (Chromium only).
   The chevron path is symmetric about the 16x16 viewBox
   centre, so the flip lands exactly on the "^"; non-scaling
   -stroke keeps the stroke width constant through the flip. */
.t-acc-chevron {
  display: inline-flex;
  transform: scaleY(1);
  transform-origin: center;
  transition: transform var(--acc-chevron) var(--acc-ease);
}
.t-acc-chevron path { vector-effect: non-scaling-stroke; }
.t-acc[data-open="true"] .t-acc-chevron {
  transform: scaleY(-1);
}

@media (prefers-reduced-motion: reduce) {
  .t-acc-panel, .t-acc-panel-inner, .t-acc-chevron {
    transition: none !important;
  }
}

/* ==================== 22 · toast ==================== */
.t-toast {
  opacity: 0;
  transform: translateY(var(--toast-distance)) scale(var(--toast-scale));
  filter: blur(var(--toast-blur));
  will-change: transform, opacity, filter;
  transition:
    opacity var(--toast-close) var(--toast-ease),
    transform var(--toast-close) var(--toast-ease),
    filter var(--toast-close) var(--toast-ease);
}
.t-toast.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  transition:
    opacity var(--toast-open) var(--toast-ease),
    transform var(--toast-open) var(--toast-ease),
    filter var(--toast-open) var(--toast-ease);
}

@media (prefers-reduced-motion: reduce) {
  .t-toast { transition: none !important; }
}

/* ==================== 23 · like button ==================== */
.t-like-heart { color: currentColor; transition: color var(--like-fill) var(--like-ease); }
.t-like-heart path {
  fill: transparent; stroke: currentColor;
  transition: fill var(--like-fill) var(--like-ease), stroke var(--like-fill) var(--like-ease);
}
.t-like[data-liked="true"] .t-like-heart { color: var(--like-color); }
.t-like[data-liked="true"] .t-like-heart path { fill: currentColor; }
/* Pop scale lives on an HTML wrapper, never the <svg> itself:
   transforming an inline SVG makes Chromium rasterise it at 1×
   (pixelated on hi-DPI). Wrapping keeps the vector crisp. */
.t-like[data-liked="true"] .t-like-icon { animation: t-like-pop var(--like-pop) var(--like-pop-ease); }
@keyframes t-like-pop { 0% { transform: scale(1); } 30% { transform: scale(0.82); } 100% { transform: scale(1); } }

/* Particle burst — 8 dots flung along per-particle vectors. */
.t-like-particles { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; color: var(--like-color); }
.t-like-particles i {
  position: absolute;
  left: calc(var(--like-particle-size) * var(--psize, 1) / -2);
  top: calc(var(--like-particle-size) * var(--psize, 1) / -2);
  width: calc(var(--like-particle-size) * var(--psize, 1));
  height: calc(var(--like-particle-size) * var(--psize, 1));
  border-radius: 50%; background: currentColor; opacity: 0;
}
@keyframes t-like-burst {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.4); }
  20%  { opacity: 1; transform: translate(calc(var(--px) * 0.25), calc(var(--py) * 0.25)) scale(1); }
  100% { opacity: 0; transform: translate(var(--px), var(--py)) scale(var(--p-end-scale, 0.6)); }
}
.t-like.is-bursting .t-like-particles i {
  animation: t-like-burst var(--pdur, var(--like-particle-dur)) ease-out var(--pdelay, 0ms) forwards;
}

@media (prefers-reduced-motion: reduce) {
  .t-like-icon, .t-like-particles i { animation: none !important; }
}

/* ==================== 24 · learn more hover ==================== */
.t-learn-chevron {
  display: inline-flex;
  transform: translateX(0);
  transition: transform var(--learn-out) var(--learn-ease);
}
.t-learn-arm {
  transform-box: view-box;
  transform-origin: 10px 8px;
  vector-effect: non-scaling-stroke;
  transition: transform var(--learn-out) var(--learn-ease);
}
.t-learn:hover .t-learn-chevron { transform: translateX(var(--learn-shift)); transition-duration: var(--learn-in); }
.t-learn:hover .t-learn-arm { transition-duration: var(--learn-in); }
.t-learn:hover .t-learn-arm-top { transform: rotate(var(--learn-spread)); }
.t-learn:hover .t-learn-arm-bot { transform: rotate(calc(var(--learn-spread) * -1)); }

@media (prefers-reduced-motion: reduce) {
  .t-learn-chevron, .t-learn-arm { transition: none !important; }
}

/* ==================== 25 · checkbox check ==================== */
.t-check {
  transition:
    background var(--check-box) var(--check-ease),
    box-shadow var(--check-box) var(--check-ease);
}
.t-check svg path {
  stroke-dasharray: var(--check-len, 15);
  stroke-dashoffset: var(--check-len, 15);
  transition: stroke-dashoffset var(--check-uncheck) var(--check-ease);
}
.t-check[aria-checked="true"] svg path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset var(--check-draw) var(--check-ease) var(--check-delay);
}

@media (prefers-reduced-motion: reduce) {
  .t-check, .t-check svg path { transition: none !important; }
}

/* ==================== 26 · spinning counter ==================== */
.t-reel { display: inline-flex; align-items: center; height: var(--reel-cell); font-variant-numeric: tabular-nums; }
.t-reel-col {
  position: relative; height: var(--reel-cell); overflow: hidden;
  /* Soft-fade the window edges instead of hard-cropping. */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, var(--neutro-800) 22%, var(--neutro-800) 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, var(--neutro-800) 22%, var(--neutro-800) 78%, transparent 100%);
}
.t-reel-strip { display: flex; flex-direction: column; will-change: transform, filter; }
.t-reel-digit { height: var(--reel-cell); display: flex; align-items: center; justify-content: center; }
/* JS drives the tween: strip.style.transition =
     'transform var(--reel-dur) var(--reel-ease) ' + (col*var(--reel-stagger)) + 'ms';
   and decays each column's feGaussianBlur stdDeviation from
   var(--reel-spin-blur) to 0 over its own window. */

@media (prefers-reduced-motion: reduce) {
  .t-reel-strip { transition: none !important; filter: none !important; }
}

/* ==================== 27 · toggle ==================== */
.t-toggle { transition: background var(--toggle-track) var(--toggle-ease); }
.t-toggle-thumb { translate: 0 0; will-change: translate; }
.t-toggle[data-on="true"] .t-toggle-thumb { translate: var(--toggle-travel) 0; }
.t-toggle.is-init[data-on="true"] .t-toggle-thumb { animation: t-toggle-on var(--toggle-dur) var(--toggle-ease) both; }
.t-toggle.is-init[data-on="false"] .t-toggle-thumb { animation: t-toggle-off var(--toggle-dur) var(--toggle-ease) both; }
@keyframes t-toggle-on {
  0% { translate: 0 0; }
  55% { translate: calc(var(--toggle-travel) + var(--toggle-ov1)) 0; }
  80% { translate: calc(var(--toggle-travel) - var(--toggle-ov2)) 0; }
  100% { translate: var(--toggle-travel) 0; }
}
@keyframes t-toggle-off {
  0% { translate: var(--toggle-travel) 0; }
  55% { translate: calc(0px - var(--toggle-ov1)) 0; }
  80% { translate: var(--toggle-ov2) 0; }
  100% { translate: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .t-toggle-thumb { animation: none !important; }
}

/* ==================== 28 · thinking states ==================== */
/* Set your type on .t-think: the sizer only reports the right
   width if it is set in the same font as the line. */
.t-think { position: relative; display: inline-block; text-align: center; }
.t-think-sizer { display: block; visibility: hidden; white-space: nowrap; }
.t-think-text {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: block;
  color: var(--think-base);
  white-space: nowrap;
  transform: translateY(0);
  filter: blur(0);
  opacity: 1;
  transition:
    transform var(--think-swap) var(--think-ease),
    filter var(--think-swap) var(--think-ease),
    opacity var(--think-swap) var(--think-ease);
  will-change: transform, filter, opacity;
}
/* Shimmer sweeps the glyphs only (background-clip: text). */
.t-think-text::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(90deg,
    transparent 0%, transparent 40%,
    var(--think-highlight) 50%,
    transparent 60%, transparent 100%);
  background-size: 400% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: t-think-shimmer var(--think-shimmer) linear infinite;
}
@keyframes t-think-shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: 0% 0; }
}
/* The outgoing line floats over the box so both halves animate. */
.t-think-text.is-exit {
  transform: translateY(calc(var(--think-distance) * -1));
  filter: blur(var(--think-blur));
  opacity: 0;
}
.t-think-text.is-enter-start {
  transition: none;
  transform: translateY(var(--think-distance));
  filter: blur(var(--think-blur));
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .t-think-text { transition: none !important; transform: none !important; filter: none !important; }
  .t-think-text::before { display: none !important; }
}

/* ==================== 29 · reasoning stream ==================== */
.t-reason { position: relative; overflow: hidden; }
.t-reason-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  /* Edge fades are a mask, not painted gradients, so the card
     background can be anything. */
  -webkit-mask-image: linear-gradient(
    transparent 0,
    var(--neutro-800) var(--reason-fade),
    var(--neutro-800) calc(100% - var(--reason-fade)),
    transparent 100%);
  mask-image: linear-gradient(
    transparent 0,
    var(--neutro-800) var(--reason-fade),
    var(--neutro-800) calc(100% - var(--reason-fade)),
    transparent 100%);
}
.t-reason-scroll {
  position: absolute;
  left: 0;
  right: 0;
  transform: translateY(0);
  will-change: transform;
}
/* JS drives the tween:
     scroll.style.transition = 'transform var(--reason-step) var(--reason-ease)';
     scroll.style.transform  = 'translateY(-' + offset + 'px)';
   and wraps the offset by one copy's height with transition: none. */

@media (prefers-reduced-motion: reduce) {
  .t-reason-scroll { transition: none !important; transform: none !important; }
}

/* ==================== 30 · streaming text ==================== */
.t-stream-w {
  opacity: 0;
  filter: blur(var(--stream-blur));
  transition:
    opacity var(--stream-fade) var(--stream-ease),
    filter var(--stream-fade) var(--stream-ease);
}
.t-stream-w.is-in {
  opacity: 1;
  filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
  .t-stream-w { transition: none !important; filter: none !important; opacity: 1 !important; }
}

/* ==================== 31 · matrix loader ==================== */
.t-matrix {
  display: grid;
  grid-template-columns: repeat(4, 2px);
  grid-auto-rows: 2px;
  gap: 2px;
}
.t-matrix i {
  display: block;
  background: var(--matrix-base);
  animation: t-matrix-pulse var(--matrix-cycle) var(--matrix-ease) infinite;
  animation-delay: calc(var(--d, 0) * 1ms);
}
/* Hole positions (rounded variants) render nothing. */
.t-matrix i.is-gap { visibility: hidden; animation: none; }
@keyframes t-matrix-pulse {
  0%, 45%, 100% { background-color: var(--matrix-base); }
  15%           { background-color: var(--matrix-active); }
}

@media (prefers-reduced-motion: reduce) {
  .t-matrix i { animation: none !important; }
}

/* ==================== 32 · banner stacking ==================== */
.t-stack { position: relative; }
.t-stack-banner {
  position: absolute;
  left: 0;
  bottom: 0;
  /* Centre origin so an arriving banner scales like a toast; the
     push-back depths switch to the bottom edge, which they can do
     freely because the swap happens at identity. */
  transform-origin: 50% 50%;
  /* Explicit blur(0) rather than an unset filter — blur → none is
     not reliably interpolated, and the cross-blur would snap. */
  filter: blur(0);
  will-change: transform, opacity, filter;
  transition:
    transform var(--stack-open) var(--stack-ease),
    opacity var(--stack-open) var(--stack-ease),
    filter var(--stack-open) var(--stack-ease);
}
.t-stack-banner[data-depth="0"] {
  z-index: 3;
  transform: translateY(0) scale(1);
  opacity: 1;
}
.t-stack-banner[data-depth="1"] {
  z-index: 2;
  transform-origin: 50% 100%;
  transform: translateY(calc(var(--stack-peek) * -1))
             scale(calc(1 - var(--stack-depth-scale)));
  opacity: calc(1 - var(--stack-depth-fade));
  filter: blur(var(--stack-depth1-blur));
}
.t-stack-banner[data-depth="2"] {
  z-index: 1;
  transform-origin: 50% 100%;
  transform: translateY(calc(var(--stack-peek) * -2))
             scale(calc(1 - var(--stack-depth-scale) * 2));
  opacity: calc(1 - var(--stack-depth-fade) * 1.6);
  filter: blur(var(--stack-depth2-blur));
}
/* Spread: newest stays put, older ones climb one banner height
   each (100% = the banner's own height). Driven by a class, not
   :hover — the gaps between spread banners belong to no element. */
.t-stack.is-spread .t-stack-banner[data-depth="1"],
.t-stack.is-spread .t-stack-banner[data-depth="2"] { opacity: 1; filter: blur(0); }
.t-stack.is-spread .t-stack-banner[data-depth="1"] {
  transform: translateY(calc((100% + var(--stack-spread-gap)) * -1)) scale(1);
}
.t-stack.is-spread .t-stack-banner[data-depth="2"] {
  transform: translateY(calc((100% + var(--stack-spread-gap)) * -2)) scale(1);
}
.t-stack-banner.is-enter {
  transition: none;
  transform: translateY(var(--stack-rise)) scale(var(--stack-scale));
  opacity: 0;
  filter: blur(var(--stack-blur));
}
.t-stack-banner.is-leaving {
  z-index: 0;
  transform-origin: 50% 100%;
  transform: translateY(calc(var(--stack-peek) * -3))
             scale(calc(1 - var(--stack-depth-scale) * 3));
  opacity: 0;
  filter: blur(var(--stack-blur));
  transition:
    transform var(--stack-close) var(--stack-ease),
    opacity var(--stack-close) var(--stack-ease),
    filter var(--stack-close) var(--stack-ease);
}

@media (prefers-reduced-motion: reduce) {
  .t-stack-banner { transition: none !important; transform: none !important; filter: none !important; }
}

/* ==================== 33 · text morph ==================== */
.t-tmorph {
  white-space: nowrap;
}
/* The changing part: both versions share one grid cell, so they
   cross-blur in place; the cell's width eases between them. */
.t-tmorph-swap {
  display: inline-grid;
  vertical-align: bottom;
  justify-items: start;
  transition: width var(--text-morph-resize-dur) var(--text-morph-ease);
}
.t-tmorph-swap > span {
  grid-area: 1 / 1;
  white-space: pre;
  transition:
    opacity var(--text-morph-dur) var(--text-morph-ease),
    filter  var(--text-morph-dur) var(--text-morph-ease);
}
.t-tmorph-new {
  opacity: 0;
  filter: blur(var(--text-morph-blur));
}
.t-tmorph-swap.is-morphing .t-tmorph-old {
  opacity: 0;
  filter: blur(var(--text-morph-blur));
}
.t-tmorph-swap.is-morphing .t-tmorph-new {
  opacity: 1;
  filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
  .t-tmorph-swap,
  .t-tmorph-swap > span { transition: none !important; }
}

/* ==================== 34 · text swap soft ==================== */
/* Both texts share one grid cell, so they cross-blur in place; the
   cell's width eases between them. */
.t-text-soft {
  display: inline-grid;
  justify-items: var(--text-soft-align, start);
  transition: width var(--text-soft-resize-dur) var(--text-soft-resize-ease);
}
.t-text-soft > span {
  grid-area: 1 / 1;
  white-space: pre;
  transition:
    filter  var(--text-soft-dur) var(--text-soft-ease),
    opacity var(--text-soft-dur) var(--text-soft-ease);
}
.t-text-soft-new {
  opacity: 0;
  filter: blur(var(--text-soft-blur));
}
.t-text-soft.is-swapping .t-text-soft-old {
  opacity: 0;
  filter: blur(var(--text-soft-blur));
}
.t-text-soft.is-swapping .t-text-soft-new {
  opacity: 1;
  filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
  .t-text-soft,
  .t-text-soft > span { transition: none !important; }
}

/* ==================== 35 · donut chart ==================== */
.t-donut {
  position: relative;
  width: 140px;
  height: 140px;
}
.t-donut svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
/* Each segment is filled and stroked in its color with a round join:
   the stroke (twice the corner radius wide) rounds the corners. */
.t-donut-seg {
  stroke-linejoin: round;
  transition: opacity 150ms cubic-bezier(0.22, 1, 0.36, 1);
}
.t-donut-seg.is-dim { opacity: 0.2; }
.t-donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .t-donut-seg { transition: none !important; }
}

/* ==================== PRO 01 · card stack hover ==================== */
.t-cstack {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

/* Each card is absolutely positioned; the stacked pose comes from its
   inline --cx/--cy/--rot, the fanned pose adds the inline deltas scaled
   by the shared multipliers. Base timing = close (collapse back). */
.t-cstack-card {
  appearance: none;
  border: 0;
  padding: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 78px;
  height: 78px;
  border-radius: 12px;
  background: var(--neutro-0);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--azul-900) 6%, transparent),
    0 2px 6px color-mix(in srgb, var(--azul-900) 5%, transparent),
    0 4px 42px color-mix(in srgb, var(--azul-900) 6%, transparent);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  translate: var(--cx) var(--cy);
  rotate: var(--rot);
  scale: 1;
  transition:
    translate var(--cstack-close-dur) var(--cstack-close-ease),
    rotate var(--cstack-close-dur) var(--cstack-close-ease),
    scale var(--cstack-scale-dur) var(--cstack-scale-ease);
  will-change: translate, rotate, scale;
}

/* Hover affordances only on devices that actually support hover
   (on touch, :hover can stick after a tap). */
@media (hover: hover) {
  .t-cstack:hover .t-cstack-card {
    translate:
      calc(var(--cx) + var(--dx))
      calc(var(--cy) + var(--dy) * var(--cstack-spread));
    rotate: calc(var(--rot) + var(--drot) * var(--cstack-rotation));
    transition:
      translate var(--cstack-open-dur) var(--cstack-open-ease),
      rotate var(--cstack-open-dur) var(--cstack-open-ease),
      scale var(--cstack-scale-dur) var(--cstack-scale-ease);
  }

  .t-cstack-card:hover {
    scale: var(--cstack-scale);
    z-index: 30;
  }
}

@media (prefers-reduced-motion: reduce) {
  .t-cstack-card { transition: none; }
}

/* ==================== PRO 02 · confetti burst ==================== */
.t-confetti-stage {
  position: relative;
  overflow: hidden;
  /* Size/radius to taste — the canvas fills whatever this is. */
}

/* The trigger sits below the canvas layer so flakes visibly land ON it. */
.t-confetti-stage .your-button,
.t-confetti-stage button {
  position: relative;
  z-index: 1;
}

.t-confetti-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* ==================== PRO 03 · drag drop physics ==================== */
/* Demo geometry: the chip is NOT stacked above the zone, it sits
   up-and-to-the-RIGHT of it. Pair bounding box 213×192; chip 72px at
   (141, 0), zone 104px at (0, 88). Any layout works — the drag maths
   is purely relative. */
.t-drop-wrap {
  position: relative;
  width: 213px;
  height: 192px;
}

/* Source chip — the draggable image. `translate` carries the drag
   offset while `rotate`/`scale` ride separate custom properties, so
   the lift and the velocity tilt compose with the drag translate
   without any of them fighting over a single `transform`. */
.t-drop-chip {
  position: absolute;
  left: 141px;
  top: 0;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--drop-card-shadow);
  box-shadow: var(--drop-card-shadow-p3);
  cursor: grab;
  /* Required: without it the browser scrolls/pans instead of
     delivering pointermove to the chip on touch. */
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  z-index: 5;
  translate: var(--dx, 0px) var(--dy, 0px);
  rotate: var(--tilt, 0deg);
  scale: var(--lift, 1);
  /* NOTE: no transition on `translate` here — while dragging the chip
     must track the pointer 1:1. The tween is added by .is-returning
     only for the spring home. */
  transition: scale var(--drop-lift-dur) cubic-bezier(0.22, 1, 0.36, 1),
              rotate 150ms ease-out;
  will-change: translate, rotate, scale;
}
.t-drop-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.t-drop-chip.is-dragging {
  cursor: grabbing;
  z-index: 30;
}
/* Springing home: JS zeroes --dx/--dy and flips this class on, so the
   translate (and the levelling tilt/lift) tween back with overshoot. */
.t-drop-chip.is-returning {
  transition: translate var(--drop-return-dur) var(--drop-return-ease),
              rotate var(--drop-return-dur) var(--drop-return-ease),
              scale var(--drop-return-dur) var(--drop-return-ease);
}
/* Released over the zone: the chip doesn't fly and doesn't resize — it
   simply dissolves where it was let go while the ZONE morphs into the
   image. Two elements, one perceived object. */
.t-drop-chip.is-fading {
  opacity: 0;
  filter: blur(2px);
  transition: opacity var(--drop-dur) var(--drop-ease),
              filter var(--drop-dur) var(--drop-ease);
  pointer-events: none;
}
@keyframes t-drop-respawn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
.t-drop-chip.is-respawning {
  animation-name: t-drop-respawn;
  animation-duration: var(--drop-respawn-dur);
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Drop zone — 104px square, 2px dashed, r12, faint fill. */
.t-drop-zone {
  position: absolute;
  left: 0;
  top: 88px;
  width: 104px;
  height: 104px;
  border-radius: 12px;
  border: var(--drop-zone-border) dashed color-mix(in srgb, var(--azul-900) 10%, transparent);
  background: color-mix(in srgb, var(--neutro-100) 20%, transparent);
  transition: border-color 150ms ease, background-color 150ms ease,
              box-shadow var(--drop-fade-in) var(--drop-fade-ease);
}
/* Hover feedback while a chip is over the zone. */
.t-drop-zone.is-over {
  border-color: color-mix(in srgb, var(--azul-900) 28%, transparent);
  background: color-mix(in srgb, var(--neutro-100) 55%, transparent);
}
.t-drop-zone-label {
  position: absolute;
  left: 50%;
  top: 38px;   /* 40px from the zone's outer edge, minus the 2px border */
  transform: translateX(-50%);
  width: 76px;
  font-size: 11px;
  line-height: 15px;
  text-align: center;
  color: var(--neutro-500);
  transition: opacity 150ms ease;
  pointer-events: none;
}
.t-drop-zone.is-over .t-drop-zone-label { opacity: 0.5; }
.t-drop-zone.is-filled {
  border-color: transparent;
  box-shadow: var(--drop-card-shadow);
  box-shadow: var(--drop-card-shadow-p3);
}
.t-drop-zone.is-filled .t-drop-zone-label { opacity: 0; }

/* The landed image. Inset by the zone's border width (NEGATIVE inset,
   plus twice the border added to the size) so it covers the whole
   border box — otherwise the dashed border's track shows as a white
   hairline ringing the image. */
.t-drop-dropped {
  position: absolute;
  inset: calc(var(--drop-zone-border) * -1);
  width: calc(100% + var(--drop-zone-border) * 2);
  height: calc(100% + var(--drop-zone-border) * 2);
  object-fit: cover;
  border-radius: 12px;
  display: block;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--drop-fade-in) var(--drop-fade-ease);
}
.t-drop-zone.is-filled .t-drop-dropped { opacity: 1; }

/* Anticipation landing: the zone squashes under the impact, then
   springs back. Two SEPARATE keyframe phases rather than one 0/50/100
   animation, so the squash and the spring get their own duration AND
   their own easing; the second is delayed by the first's duration and
   both are `forwards` so the chain holds its end state. */
@keyframes t-drop-zone-down {
  from { transform: scale(1); }
  to   { transform: scale(var(--drop-morph-squash, 0.97)); }
}
@keyframes t-drop-zone-up {
  from { transform: scale(var(--drop-morph-squash, 0.97)); }
  to   { transform: scale(1); }
}
.t-drop-zone.is-landing {
  /* Longhands, not the `animation` shorthand: WebKit mis-parses
     var() substitutions inside the shorthand. */
  animation-name: t-drop-zone-down, t-drop-zone-up;
  animation-duration: var(--drop-down-dur), var(--drop-up-dur);
  animation-timing-function: var(--drop-down-ease), var(--drop-up-ease);
  animation-delay: 0ms, var(--drop-down-dur);
  animation-fill-mode: forwards, forwards;
  will-change: transform;
}

/* Revert: the image blurs away and the zone returns to its dashed
   empty state. */
.t-drop-zone.is-emptying .t-drop-dropped {
  opacity: 0;
  filter: blur(4px);
  transition: opacity var(--drop-out-dur) cubic-bezier(0.22, 1, 0.36, 1),
              filter var(--drop-out-dur) cubic-bezier(0.22, 1, 0.36, 1);
}
/* Placed AFTER .is-filled (equal specificity — source order wins) so
   the shadow fades out in step with the image instead of snapping off
   once .is-filled is finally removed. */
.t-drop-zone.is-emptying {
  border-color: color-mix(in srgb, var(--azul-900) 10%, transparent);
  box-shadow: var(--drop-card-shadow-off);
  transition: box-shadow var(--drop-out-dur) cubic-bezier(0.22, 1, 0.36, 1),
              border-color var(--drop-out-dur) cubic-bezier(0.22, 1, 0.36, 1);
}

/* Impact smoke. The svg overhangs the zone by 50px on every side so
   the expanding wave never clips. Its 204-unit viewBox therefore maps
   the image box to [52, 152]. */
.t-drop-puffs {
  position: absolute;
  inset: -50px;
  width: calc(100% + 100px);
  height: calc(100% + 100px);
  overflow: visible;
  pointer-events: none;
}
/* Wavefront — a rounded ring hugging the image outline that expands
   outward while fading. The whole <g> is filtered as ONE surface, so
   the shells fuse into a single undulating smoke front with wispy,
   torn edges rather than countable blurred circles. */
.t-drop-wave {
  fill: none;
  stroke: color-mix(in srgb, var(--neutro-500) calc(var(--drop-wave-opacity) * 100%), transparent);
  opacity: 0;
  transform: translate(0, 0) scale(0.96);
  transform-box: fill-box;
  transform-origin: center;
}
/* Subtle gravity: the wave billows out AND settles downward, the way
   impact dust does, instead of expanding perfectly radially. */
@keyframes t-drop-wave {
  0%   { opacity: 0;   transform: translate(0, 0) scale(0.96); }
  16%  { opacity: 0.9; }
  100% { opacity: 0;   transform: translate(0, var(--drop-wave-gravity, 10px)) scale(var(--wscale, 1.5)); }
}
/* --wdur / --wdelay / --wscale are per-shell, written by the driver
   onto each <rect> so the shells ride staggered clocks. */
.t-drop-zone.is-bursting .t-drop-wave {
  animation-name: t-drop-wave;
  animation-duration: var(--wdur, var(--drop-puff-dur));
  animation-timing-function: ease-out;
  animation-delay: var(--wdelay, 0ms);
  animation-fill-mode: forwards;
}

@media (prefers-reduced-motion: reduce) {
  .t-drop-chip { transition: none !important; }
  .t-drop-chip.is-respawning { animation: none !important; }
  .t-drop-zone.is-bursting .t-drop-wave,
  .t-drop-zone.is-landing { animation: none !important; }
  .t-drop-chip.is-fading,
  .t-drop-dropped { transition: none !important; }
}

/* ==================== PRO 04 · get pro button ==================== */
/* The pill: plain white button chrome. Only `position: relative` and
   `overflow: hidden` matter to the effect — restyle the rest freely. */
.t-pro-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: 0;
  cursor: pointer;
  background: var(--neutro-0);
  border-radius: 50px;
  overflow: hidden;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.4;
  color: var(--neutro-800);
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow:
    0 1px 3px 0 color-mix(in srgb, var(--azul-900) 4%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--azul-900) 6%, transparent),
    inset 0 -1px 0 0 color-mix(in srgb, var(--azul-900) 10%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--neutro-300) 10%, transparent);
}

/* The wash. Seven Figma radial gradients preserved as inline-SVG
   layers (their rotated ellipses can't be expressed with CSS
   radial-gradient()), blown up to 180% so the blobs sweep
   corner-to-corner as they orbit. */
.t-pro-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 60% 90% at 50% 50%, color-mix(in srgb, var(--azul-500) 88%, transparent), transparent 72%),
    radial-gradient(ellipse 60% 90% at 35% 60%, color-mix(in srgb, var(--azul-500) 50%, transparent), transparent 72%),
    radial-gradient(ellipse 60% 90% at 65% 40%, color-mix(in srgb, var(--azul-700) 40%, transparent), transparent 72%),
    radial-gradient(ellipse 60% 90% at 50% 45%, var(--azul-700), transparent 72%),
    radial-gradient(ellipse 60% 90% at 30% 30%, var(--neutro-300), transparent 72%),
    radial-gradient(ellipse 60% 90% at 70% 70%, var(--azul-600), transparent 72%),
    radial-gradient(ellipse 60% 90% at 50% 20%, var(--azul-500), transparent 72%);
  background-size: 180% 180%, 180% 180%, 180% 180%, 180% 180%,
                   180% 180%, 180% 180%, 180% 180%;
  background-repeat: no-repeat;
  /* Rim-only wash: the mask clears the centre so the label sits on
     clean white and the colour reads as a glow creeping in from the
     edges. The ellipse is deliberately smaller than the pill (46%)
     so full opacity is reached INSIDE the border — sizing it past
     the edge would clip the opaque end of the ramp and leave the
     whole wash near-invisible. */
  -webkit-mask-image: radial-gradient(
    ellipse 46% 46% at 50% 50%,
    transparent var(--probtn-core),
    var(--neutro-800) calc(var(--probtn-core) + var(--probtn-core-blur))
  );
  mask-image: radial-gradient(
    ellipse 46% 46% at 50% 50%,
    transparent var(--probtn-core),
    var(--neutro-800) calc(var(--probtn-core) + var(--probtn-core-blur))
  );
  opacity: var(--probtn-strength);
  animation:
    t-pro-btn-hue var(--probtn-hue-dur) linear infinite,
    t-pro-btn-drift var(--probtn-drift-dur) ease-in-out infinite;
}

/* The label rides above the wash. */
.t-pro-btn-label {
  position: relative;
  z-index: 1;
}

/* Full hue cycle — ends where it starts, so the loop is seamless.
   The saturate boost keeps the washes punchy at the 180% blow-up;
   the blur turns blobs into atmosphere. Compositor-only. */
@keyframes t-pro-btn-hue {
  from { filter: hue-rotate(0deg) saturate(1.3) blur(var(--probtn-blur)); }
  to   { filter: hue-rotate(-360deg) saturate(1.3) blur(var(--probtn-blur)); }
}
/* Blob travel — the same perimeter orbit as the Pro gradient text,
   minus its static grey-ramp layer: each blob is pinned to the ring
   of edge stops TL,T,TR,R,BR,B,BL,L and advances two ring stops per
   keyframe — a full lap around the pill per cycle, so colour hugs
   and travels the rim while the mask keeps the middle clean. */
@keyframes t-pro-btn-drift {
  0%, 100% {
    background-position:
      100% 0%, 0% 50%, 100% 50%, 0% 100%,
      0% 0%, 50% 0%, 50% 100%;
  }
  25% {
    background-position:
      100% 100%, 50% 0%, 50% 100%, 0% 0%,
      100% 0%, 100% 50%, 0% 50%;
  }
  50% {
    background-position:
      0% 100%, 100% 0%, 0% 100%, 100% 0%,
      100% 100%, 100% 100%, 0% 0%;
  }
  75% {
    background-position:
      0% 0%, 100% 100%, 0% 0%, 100% 100%,
      50% 100%, 0% 100%, 100% 50%;
  }
}

/* Reduced motion — required: the wash freezes on its first frame,
   which still reads as a premium rim glow. */
@media (prefers-reduced-motion: reduce) {
  .t-pro-btn::before { animation: none; }
}

/* ==================== PRO 05 · gooey plus menu ==================== */
/* Anchor reserves the OPEN fan's footprint so nothing reflows when
   the menu opens. */
.t-goo-anchor {
  position: relative;
  width: 200px;
  height: 140px;
}

/* Blob layer — carries the goo AND the shadow. Plain filled circles
   mirroring the button geometry 1:1; the filter runs goo FIRST, then
   shadows the merged silhouette, so one consistent shadow hugs the
   liquid through every state. */
.t-goo-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  /* Promote the filtered layer: WebKit otherwise repaints the goo a
     frame or two behind the plain-DOM buttons, which reads as the
     icons running ahead of their surface. */
  will-change: filter, transform;
}

/* transform, NOT the individual `translate:` property — WebKit's
   support for individual transform properties on SVG elements (and
   inside keyframes) is what breaks the fan sync, the anticipation and
   the easings in Safari. Classic transform is solid everywhere. */
.t-goo-blob {
  fill: var(--goo-surface, var(--neutro-0));
  transform: translate(0, 0);
  transform-box: fill-box;
  transition: transform var(--goo-close-dur) var(--goo-close-ease);
  will-change: transform;
}
.t-goo-anchor[data-open="true"] .t-goo-blob {
  transform: translate(calc(var(--fx, 0px) * var(--goo-spread)),
                       calc(var(--fy, 0px) * var(--goo-spread)));
  transition: transform var(--goo-open-dur) var(--goo-open-ease);
  transition-delay: calc(var(--i, 0) * var(--goo-stagger));
}

/* UI layer — transparent hit targets + crisp icons only; the goo
   liquid below is the visible surface (and its filter derives the
   shadow from the merged silhouette). */
.t-goo-item,
.t-goo-main {
  position: absolute;
  left: 80px;
  top: 80px;
  width: 40px;
  height: 40px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--goo-icon-color, var(--neutro-800));
  -webkit-tap-highlight-color: transparent;
  transform: translate(0, 0);
  transition: transform var(--goo-close-dur) var(--goo-close-ease),
              background-color 120ms ease;
  will-change: transform;
}
/* Satellites are inert while closed — they're stacked under the main
   button and must not swallow its clicks. */
.t-goo-item { pointer-events: none; }
.t-goo-anchor[data-open="true"] .t-goo-item {
  pointer-events: auto;
  transform: translate(calc(var(--fx, 0px) * var(--goo-spread)),
                       calc(var(--fy, 0px) * var(--goo-spread)));
  transition: transform var(--goo-open-dur) var(--goo-open-ease),
              background-color 120ms ease;
  transition-delay: calc(var(--i, 0) * var(--goo-stagger)), 0ms;
}
.t-goo-anchor[data-open="true"] .t-goo-item:hover { background: color-mix(in srgb, var(--azul-900) 4%, transparent); }
.t-goo-main:focus-visible,
.t-goo-item:focus-visible {
  outline: 2px solid var(--neutro-800);
  outline-offset: 2px;
}

/* Satellite icons hold back while the blob is still merged with the
   main button, then cross-blur in as it pulls clear — icons floating
   free of any surface breaks the liquid illusion. On close they clear
   out inside the first stretch of the retraction, mirroring how they
   arrive a third of the way into the open; lingering icons read as
   detached the moment the goo layer repaints even a frame late. */
.t-goo-item svg {
  display: block;
  opacity: 0;
  filter: blur(2px);
  transition: opacity 120ms ease, filter 120ms ease;
}
/* Icons materialise with a 2px cross-blur early in the flight (a short
   fixed head start per satellite), so they ride the button into place
   instead of popping after it lands. */
.t-goo-anchor[data-open="true"] .t-goo-item svg {
  opacity: 1;
  filter: blur(0);
  transition: opacity 180ms ease, filter 180ms ease;
  transition-delay: calc(var(--i, 0) * var(--goo-stagger) + 120ms),
                    calc(var(--i, 0) * var(--goo-stagger) + 120ms);
}

/* Close anticipation — the button (and its blob, so the goo follows)
   nudges down into the returning satellites' momentum and settles
   back. The driver adds .is-anticipating for the keyframes' duration
   on close. */
@keyframes t-goo-anticipate {
  0%   { transform: translateY(0); }
  30%  { transform: translateY(var(--goo-anticip)); }
  100% { transform: translateY(0); }
}
/* The nudge rides the WHOLE goo layer, not just the main blob: with
   every blob stacked at the centre when closed, moving one circle
   inside the union merely stretches the silhouette vertically — the
   layer moving as one is what reads as the button physically dipping.
   Satellites still mid-flight keep their own return transitions
   relative to the moving layer. */
.t-goo-anchor.is-anticipating .t-goo-layer,
.t-goo-anchor.is-anticipating .t-goo-main {
  /* Longhands, not the `animation` shorthand: WebKit mis-parses var()
     inside the shorthand and falls back to 0s / defaults. */
  animation-name: t-goo-anticipate;
  animation-duration: var(--goo-anticip-dur);
  animation-timing-function: var(--goo-anticip-ease);
  animation-fill-mode: both;
}

/* Plus → X: pure rotation — the plus glyph spun 45° IS the X, so one
   icon covers both states with a single tween. */
.t-goo-swap {
  position: relative;
  display: inline-grid;
  place-items: center;
  transform: rotate(0deg);
  transition: transform var(--goo-icon-dur) var(--goo-icon-ease);
}
.t-goo-anchor[data-open="true"] .t-goo-swap { transform: rotate(var(--goo-icon-rotate)); }
.t-goo-icon {
  grid-area: 1 / 1;
  display: inline-flex;
}
.t-goo-icon svg { display: block; }

@media (prefers-reduced-motion: reduce) {
  .t-goo-blob,
  .t-goo-item,
  .t-goo-item svg,
  .t-goo-swap,
  .t-goo-icon { transition: none !important; }
  .t-goo-anchor.is-anticipating .t-goo-layer,
  .t-goo-anchor.is-anticipating .t-goo-main { animation: none !important; }
}

/* ==================== PRO 06 · image gen placeholder ==================== */
/* The card owns both surfaces — the dot field and the finished
   image — so the reveal is a true cross-fade through a shared blur. */
.t-imgen {
  position: relative;
  width: 142px;
  height: 142px;
  border-radius: 12px;
  background: var(--neutro-100);
  overflow: hidden;
  isolation: isolate;
}
.t-imgen-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition:
    opacity var(--imgen-reveal-dur) var(--imgen-reveal-ease),
    filter var(--imgen-reveal-dur) var(--imgen-reveal-ease);
}
.t-imgen-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  opacity: 0;
  filter: blur(var(--imgen-reveal-blur));
  transition:
    opacity var(--imgen-reveal-dur) var(--imgen-reveal-ease),
    filter var(--imgen-reveal-dur) var(--imgen-reveal-ease);
}
.t-imgen.is-revealed .t-imgen-field {
  opacity: 0;
  filter: blur(var(--imgen-reveal-blur));
}
.t-imgen.is-revealed .t-imgen-img {
  opacity: 1;
  filter: blur(0);
}

/* Each dot owns a randomized clock: --k multiplies the shared cycle
   and --delay is a negative phase offset, so the field is already
   mid-shimmer on first paint. Grow-in / shrink-out reads as dots
   condensing rather than blinking. */
/* At rest every dot holds --v, the value its twinkle would have at
   its own phase — so the idle card is a frozen frame of the loader
   rather than a solid grid. */
.t-imgen-field i {
  position: absolute;
  width: var(--imgen-dot);
  height: var(--imgen-dot);
  border-radius: 50%;
  background: var(--imgen-dot-color);
  opacity: calc(var(--imgen-peak) * var(--v, 1));
  transform: scale(
    calc(var(--imgen-scale-min) + (1 - var(--imgen-scale-min)) * var(--v, 1))
  );
}

/* The lattice only breathes while the card is generating; at rest it
   is a plain static field. */
.t-imgen.is-loading .t-imgen-field i {
  animation: t-imgen-twinkle calc(var(--imgen-cycle) * var(--k, 1))
    var(--imgen-ease) var(--delay, 0ms) infinite;
}
@keyframes t-imgen-twinkle {
  0%, 100% {
    opacity: 0;
    transform: scale(var(--imgen-scale-min));
  }
  50% {
    opacity: var(--imgen-peak);
    transform: scale(1);
  }
}

/* Reduced motion — required: the twinkle stops (the frozen frame
   stands in for it) and the reveal snaps instead of blurring. */
@media (prefers-reduced-motion: reduce) {
  .t-imgen.is-loading .t-imgen-field i { animation: none !important; }
  .t-imgen-field,
  .t-imgen-img {
    filter: none !important;
    transition: none !important;
  }
}

/* ==================== PRO 07 · image open tilt ==================== */
/* The stage supplies the 3D perspective so the tilt reads as depth. */
.t-opentilt-stage {
  perspective: var(--opentilt-perspective);
}

.t-opentilt-card {
  appearance: none;
  border: 0;
  padding: 0;
  position: relative;
  width: var(--opentilt-open-w);
  height: var(--opentilt-open-h);
  border-radius: 32px;
  /* overflow stays VISIBLE (the rounded clip lives on the img via
     border-radius: inherit) so the bend canvas can bow past the box —
     and, critically, so overflow never toggles mid-flight: in Safari
     that would kick the card off its compositor layer and jank the
     scale/tilt spring. */
  overflow: visible;
  cursor: pointer;
  background: var(--neutro-100);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--azul-900) 6%, transparent),
    0 2px 6px color-mix(in srgb, var(--azul-900) 5%, transparent),
    0 4px 42px color-mix(in srgb, var(--azul-900) 6%, transparent);
  -webkit-tap-highlight-color: transparent;
  transform-origin: center;
  /* The zoom lives on the separate `scale` property so it runs as ONE
     continuous spring, while the tilt rides on `transform` keyframes
     that peak mid-flight — the two compose. */
  scale: var(--opentilt-closed-scale);
  transform: rotateX(0deg) rotateY(0deg) translateZ(0);
  will-change: scale, transform;
  transition:
    scale var(--opentilt-close-dur) var(--opentilt-close-ease),
    border-radius var(--opentilt-close-dur) var(--opentilt-close-ease);
}

/* Bend render layer: hidden at rest; JS sizes it (with an inline
   negative inset so the bow can travel outside the card box) and
   draws the warped photo during the flight. */
.t-opentilt-canvas {
  position: absolute;
  display: none;
  pointer-events: none;
}
/* While bending, the canvas IS the card's visual: hide the flat
   photo + background so no straight-edged fill peeks out behind the
   bowed edges (the rounded clip is baked into the warp). The
   box-shadow stays — soft enough that not bending it is
   imperceptible, and it never flickers on/off this way. */
.t-opentilt-card.is-bending {
  background: transparent;
}
.t-opentilt-card.is-bending .t-opentilt-img { visibility: hidden; }
.t-opentilt-card.is-bending .t-opentilt-canvas { display: block; }

.t-opentilt-card.is-open {
  border-radius: 16px;
  scale: 1;
  transition:
    scale var(--opentilt-open-dur) var(--opentilt-open-ease),
    border-radius var(--opentilt-open-dur) var(--opentilt-open-ease);
  /* Tilt overlay: pitched back and lifting toward the viewer, strongest
     ~40% into the flight, settling flat by landing. */
  animation: t-opentilt-open var(--opentilt-open-dur) both;
}

/* Close dive: a smaller opposite tilt as it drops back into the preview
   (the base scale transition carries the shrink). */
.t-opentilt-card.is-closing {
  animation: t-opentilt-close var(--opentilt-close-dur) both;
}

@keyframes t-opentilt-open {
  0% {
    transform: rotateX(0deg) rotateY(0deg) translateZ(0);
    animation-timing-function: cubic-bezier(0.3, 0.7, 0.4, 1);
  }
  40% {
    transform:
      rotateX(var(--opentilt-tilt-x))
      rotateY(var(--opentilt-tilt-y))
      translateZ(var(--opentilt-lift));
    animation-timing-function: cubic-bezier(0.45, 0, 0.3, 1);
  }
  100% {
    transform: rotateX(0deg) rotateY(0deg) translateZ(0);
  }
}

@keyframes t-opentilt-close {
  0% {
    transform: rotateX(0deg) rotateY(0deg) translateZ(0);
    animation-timing-function: cubic-bezier(0.4, 0.4, 0.5, 1);
  }
  45% {
    transform:
      rotateX(calc(var(--opentilt-tilt-x) * -0.45))
      rotateY(calc(var(--opentilt-tilt-y) * -0.45))
      translateZ(calc(var(--opentilt-lift) * 0.4));
    animation-timing-function: cubic-bezier(0.45, 0, 0.3, 1);
  }
  100% {
    transform: rotateX(0deg) rotateY(0deg) translateZ(0);
  }
}

.t-opentilt-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
  /* The rounded clip (tracks the card's animating radius). */
  border-radius: inherit;
}

@media (prefers-reduced-motion: reduce) {
  .t-opentilt-card,
  .t-opentilt-card.is-open { animation: none; transition: none; }
}

/* ==================== PRO 08 · organic shimmer ==================== */
.t-oshimmer-tile {
  position: relative;
  width: 142px;
  height: 142px;
  border-radius: 12px;
  background: var(--neutro-100);
  overflow: hidden;
  isolation: isolate;
  flex-shrink: 0;
}
html[data-theme="dark"] .t-oshimmer-tile { background: var(--neutro-800); }
/* Play/Stop toggle: both layers share the t-oshimmer-sweep clock,
   so pausing/resuming the container's data attribute freezes or
   resumes them in lockstep. */
.t-oshimmer-tile[data-playing="false"] .t-oshimmer-band,
.t-oshimmer-tile[data-playing="false"] .t-oshimmer-edge {
  animation-play-state: paused;
}
/* Shimmer split into wrapper + inner band: the inner band carries
   the colourful blobs (sized in % of the layer, so they scale with
   the tile) + traveling mask; the wrapper warps + blurs
   the already-masked result so the band boundary undulates (filter
   applies before mask on a single element, hence the split). */
.t-oshimmer {
  position: absolute;
  inset: calc(-20px * var(--oshimmer-scale));
  filter: url(#t-shimmer-warp) blur(calc(5px * var(--oshimmer-scale)));
  opacity: var(--oshimmer-opacity);
  pointer-events: none;
}
.t-oshimmer-band {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 49.45% 38.46% at 20% 15%, color-mix(in srgb, var(--azul-500) 14%, transparent), transparent),
    radial-gradient(ellipse 43.96% 32.97% at 65% 25%, color-mix(in srgb, var(--azul-700) 13%, transparent), transparent),
    radial-gradient(ellipse 38.46% 43.96% at 30% 55%, color-mix(in srgb, var(--azul-600) 12%, transparent), transparent),
    radial-gradient(ellipse 49.45% 38.46% at 75% 65%, color-mix(in srgb, var(--azul-900) 13%, transparent), transparent),
    radial-gradient(ellipse 38.46% 32.97% at 45% 85%, color-mix(in srgb, var(--neutro-300) 12%, transparent), transparent),
    radial-gradient(ellipse 32.97% 32.97% at 10% 85%, color-mix(in srgb, var(--azul-500) 11%, transparent), transparent),
    linear-gradient(color-mix(in srgb, var(--neutro-500) 5%, transparent), color-mix(in srgb, var(--neutro-500) 5%, transparent));
  -webkit-mask-image: linear-gradient(
    135deg,
    transparent 0%,
    transparent calc(50% - var(--oshimmer-band-span) * 0.8),
    color-mix(in srgb, var(--neutro-0) 25%, transparent) calc(50% - var(--oshimmer-band-span) * 0.45),
    color-mix(in srgb, var(--neutro-0) 70%, transparent) calc(50% - var(--oshimmer-band-span) * 0.18),
    var(--neutro-0) 50%,
    color-mix(in srgb, var(--neutro-0) 70%, transparent) calc(50% + var(--oshimmer-band-span) * 0.18),
    color-mix(in srgb, var(--neutro-0) 25%, transparent) calc(50% + var(--oshimmer-band-span) * 0.45),
    transparent calc(50% + var(--oshimmer-band-span) * 0.8),
    transparent 100%
  );
  -webkit-mask-size: 280% 280%;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: 100% 100%;
  mask-image: linear-gradient(
    135deg,
    transparent 0%,
    transparent calc(50% - var(--oshimmer-band-span) * 0.8),
    color-mix(in srgb, var(--neutro-0) 25%, transparent) calc(50% - var(--oshimmer-band-span) * 0.45),
    color-mix(in srgb, var(--neutro-0) 70%, transparent) calc(50% - var(--oshimmer-band-span) * 0.18),
    var(--neutro-0) 50%,
    color-mix(in srgb, var(--neutro-0) 70%, transparent) calc(50% + var(--oshimmer-band-span) * 0.18),
    color-mix(in srgb, var(--neutro-0) 25%, transparent) calc(50% + var(--oshimmer-band-span) * 0.45),
    transparent calc(50% + var(--oshimmer-band-span) * 0.8),
    transparent 100%
  );
  mask-size: 280% 280%;
  mask-repeat: no-repeat;
  mask-position: 100% 100%;
  animation: t-oshimmer-sweep var(--oshimmer-dur) var(--oshimmer-ease) infinite;
  pointer-events: none;
}
/* Edge beam: a uniform ink ring + glow + bloom underneath, shaped
   only by a comet-profiled 135° mask window phase-locked to the
   shimmer's clock — the lit segment brightens and fades smoothly as
   it glides along the border. */
.t-oshimmer-edge {
  position: absolute;
  inset: calc(-20px * var(--oshimmer-scale));
  z-index: 1;
  opacity: var(--oshimmer-glow-strength);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(
    135deg,
    transparent 0%,
    transparent calc(50% - var(--oshimmer-band-span) * 1.4),
    color-mix(in srgb, var(--neutro-0) 6%, transparent) calc(50% - var(--oshimmer-band-span) * 1),
    color-mix(in srgb, var(--neutro-0) 18%, transparent) calc(50% - var(--oshimmer-band-span) * 0.6),
    color-mix(in srgb, var(--neutro-0) 45%, transparent) calc(50% - var(--oshimmer-band-span) * 0.25),
    var(--neutro-0) 50%,
    color-mix(in srgb, var(--neutro-0) 50%, transparent) calc(50% + var(--oshimmer-band-span) * 0.18),
    transparent calc(50% + var(--oshimmer-band-span) * 0.35),
    transparent 100%
  );
  -webkit-mask-size: 280% 280%;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: 100% 100%;
  mask-image: linear-gradient(
    135deg,
    transparent 0%,
    transparent calc(50% - var(--oshimmer-band-span) * 1.4),
    color-mix(in srgb, var(--neutro-0) 6%, transparent) calc(50% - var(--oshimmer-band-span) * 1),
    color-mix(in srgb, var(--neutro-0) 18%, transparent) calc(50% - var(--oshimmer-band-span) * 0.6),
    color-mix(in srgb, var(--neutro-0) 45%, transparent) calc(50% - var(--oshimmer-band-span) * 0.25),
    var(--neutro-0) 50%,
    color-mix(in srgb, var(--neutro-0) 50%, transparent) calc(50% + var(--oshimmer-band-span) * 0.18),
    transparent calc(50% + var(--oshimmer-band-span) * 0.35),
    transparent 100%
  );
  mask-size: 280% 280%;
  mask-repeat: no-repeat;
  mask-position: 100% 100%;
  animation: t-oshimmer-sweep var(--oshimmer-dur) var(--oshimmer-ease) infinite;
}
@keyframes t-oshimmer-sweep {
  0%   { -webkit-mask-position: 100% 100%; mask-position: 100% 100%; }
  100% { -webkit-mask-position: 0% 0%;     mask-position: 0% 0%; }
}
.t-oshimmer-edge-ring,
.t-oshimmer-edge-glow,
.t-oshimmer-edge-bloom {
  position: absolute;
  inset: calc(20px * var(--oshimmer-scale));
  border-radius: 12px;
  pointer-events: none;
}
/* Ring stroke: the border-beam library's 9 border-palette blobs
   (colorPalettes.colorful, positions/sizes ×0.6) painted into a
   1px ring over a faint neutral base that keeps the stroke from
   vanishing between blobs as the comet window travels. */
.t-oshimmer-edge-ring {
  padding: calc(1px * var(--oshimmer-scale));
  opacity: var(--oshimmer-ring-strength);
  background:
    radial-gradient(ellipse 29.58% 16.90% at 33% -7.4%, color-mix(in srgb, var(--azul-700) 62%, transparent), transparent),
    radial-gradient(ellipse 25.35% 14.79% at 12% -5%, color-mix(in srgb, var(--azul-500) 48%, transparent), transparent),
    radial-gradient(ellipse 16.90% 29.58% at 2.1% 68.3%, color-mix(in srgb, var(--azul-600) 55%, transparent), transparent),
    radial-gradient(ellipse 8.45% 14.79% at 2.1% 68.3%, color-mix(in srgb, var(--azul-500) 44%, transparent), transparent),
    radial-gradient(ellipse 76.06% 13.38% at 74.4% 100%, color-mix(in srgb, var(--azul-600) 58%, transparent), transparent),
    radial-gradient(ellipse 35.92% 11.27% at 55% 100%, color-mix(in srgb, var(--azul-500) 51%, transparent), transparent),
    radial-gradient(ellipse 30.99% 13.38% at 93.9% 0%, color-mix(in srgb, var(--neutro-300) 65%, transparent), transparent),
    radial-gradient(ellipse 11.27% 17.61% at 100% 27.1%, color-mix(in srgb, var(--azul-700) 50%, transparent), transparent),
    radial-gradient(ellipse 21.83% 20.42% at 100% 27.1%, color-mix(in srgb, var(--azul-900) 56%, transparent), transparent),
    linear-gradient(color-mix(in srgb, var(--neutro-500) 22%, transparent), color-mix(in srgb, var(--neutro-500) 22%, transparent));
  -webkit-mask: linear-gradient(var(--neutro-0) 0 0) content-box, linear-gradient(var(--neutro-0) 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(var(--neutro-0) 0 0) content-box, linear-gradient(var(--neutro-0) 0 0);
  mask-composite: exclude;
}
/* Inner glow: the library's PULSE_INNER blob set (×0.6) in real
   colors + four neutral corner accents, belt-masked with a 44px
   fade and softened 2px so the coloured lumps melt together. */
.t-oshimmer-edge-glow {
  background:
    radial-gradient(ellipse 27.46% 14.79% at 33% -7.4%, color-mix(in srgb, var(--azul-700) 34%, transparent), transparent),
    radial-gradient(ellipse 23.24% 12.68% at 12% -5%, color-mix(in srgb, var(--azul-500) 28%, transparent), transparent),
    radial-gradient(ellipse 14.79% 27.46% at 2.1% 68.3%, color-mix(in srgb, var(--azul-600) 30%, transparent), transparent),
    radial-gradient(ellipse 6.34% 12.68% at 2.1% 68.3%, color-mix(in srgb, var(--azul-500) 25%, transparent), transparent),
    radial-gradient(ellipse 73.24% 11.97% at 74.4% 100%, color-mix(in srgb, var(--azul-600) 32%, transparent), transparent),
    radial-gradient(ellipse 33.80% 9.15% at 55% 100%, color-mix(in srgb, var(--azul-500) 28%, transparent), transparent),
    radial-gradient(ellipse 28.87% 11.97% at 93.9% 0%, color-mix(in srgb, var(--neutro-300) 35%, transparent), transparent),
    radial-gradient(ellipse 9.15% 16.20% at 100% 27.1%, color-mix(in srgb, var(--azul-700) 28%, transparent), transparent),
    radial-gradient(ellipse 19.72% 18.31% at 100% 27.1%, color-mix(in srgb, var(--azul-900) 30%, transparent), transparent),
    radial-gradient(ellipse 25.35% 25.35% at 0% 0%, color-mix(in srgb, var(--neutro-500) 14%, transparent), transparent 70%),
    radial-gradient(ellipse 25.35% 25.35% at 100% 0%, color-mix(in srgb, var(--neutro-500) 14%, transparent), transparent 70%),
    radial-gradient(ellipse 25.35% 25.35% at 0% 100%, color-mix(in srgb, var(--neutro-500) 14%, transparent), transparent 70%),
    radial-gradient(ellipse 25.35% 25.35% at 100% 100%, color-mix(in srgb, var(--neutro-500) 14%, transparent), transparent 70%);
  box-shadow: inset 0 0 calc(14px * var(--oshimmer-scale)) calc(1px * var(--oshimmer-scale)) color-mix(in srgb, var(--neutro-500) 12%, transparent);
  filter: blur(calc(2px * var(--oshimmer-scale)));
  -webkit-mask-image:
    linear-gradient(var(--neutro-0), transparent calc(44px * var(--oshimmer-scale)), transparent calc(100% - 44px * var(--oshimmer-scale)), var(--neutro-0)),
    linear-gradient(to right, var(--neutro-0), transparent calc(44px * var(--oshimmer-scale)), transparent calc(100% - 44px * var(--oshimmer-scale)), var(--neutro-0));
  -webkit-mask-composite: source-over;
  mask-image:
    linear-gradient(var(--neutro-0), transparent calc(44px * var(--oshimmer-scale)), transparent calc(100% - 44px * var(--oshimmer-scale)), var(--neutro-0)),
    linear-gradient(to right, var(--neutro-0), transparent calc(44px * var(--oshimmer-scale)), transparent calc(100% - 44px * var(--oshimmer-scale)), var(--neutro-0));
  mask-composite: add;
}
/* Bloom: the library's PULSE_INNER_BLOOM table — 7 expanded blobs
   (×0.65) in real colors, heavily blurred over a faint neutral
   wash, in a soft edge belt (not ring-clipped, so the blur can
   radiate). The big organic coloured glow pouring off the stroke. */
.t-oshimmer-edge-bloom {
  background:
    radial-gradient(ellipse 38.73% 21.83% at 33% -7.4%, color-mix(in srgb, var(--azul-700) 40%, transparent), transparent),
    radial-gradient(ellipse 33.10% 19.01% at 12% -5%, color-mix(in srgb, var(--azul-500) 34%, transparent), transparent),
    radial-gradient(ellipse 21.83% 38.73% at 2.1% 68.3%, color-mix(in srgb, var(--azul-600) 38%, transparent), transparent),
    radial-gradient(ellipse 98.59% 17.61% at 74.4% 100%, color-mix(in srgb, var(--azul-600) 40%, transparent), transparent),
    radial-gradient(ellipse 46.48% 14.08% at 55% 100%, color-mix(in srgb, var(--azul-500) 35%, transparent), transparent),
    radial-gradient(ellipse 40.85% 17.61% at 93.9% 0%, color-mix(in srgb, var(--neutro-300) 44%, transparent), transparent),
    radial-gradient(ellipse 28.17% 26.76% at 100% 27.1%, color-mix(in srgb, var(--azul-900) 38%, transparent), transparent);
  box-shadow:
    inset 0 0 calc(var(--oshimmer-glow-blur) * 3 * var(--oshimmer-scale)) calc(var(--oshimmer-glow-blur) / 2 * var(--oshimmer-scale))
      color-mix(in srgb, var(--neutro-500) 10%, transparent);
  filter: blur(calc(var(--oshimmer-glow-blur) * var(--oshimmer-scale)));
  -webkit-mask-image:
    linear-gradient(var(--neutro-0), transparent calc(26px * var(--oshimmer-scale)), transparent calc(100% - 26px * var(--oshimmer-scale)), var(--neutro-0)),
    linear-gradient(to right, var(--neutro-0), transparent calc(26px * var(--oshimmer-scale)), transparent calc(100% - 26px * var(--oshimmer-scale)), var(--neutro-0));
  -webkit-mask-composite: source-over;
  mask-image:
    linear-gradient(var(--neutro-0), transparent calc(26px * var(--oshimmer-scale)), transparent calc(100% - 26px * var(--oshimmer-scale)), var(--neutro-0)),
    linear-gradient(to right, var(--neutro-0), transparent calc(26px * var(--oshimmer-scale)), transparent calc(100% - 26px * var(--oshimmer-scale)), var(--neutro-0));
  mask-composite: add;
}

@media (prefers-reduced-motion: reduce) {
  .t-oshimmer-band,
  .t-oshimmer-edge { animation: none; }
}

/* ==================== PRO 09 · pro gradient text ==================== */
.t-gradient-text {
  background-image:
    radial-gradient(ellipse 60% 90% at 50% 50%, color-mix(in srgb, var(--azul-500) 88%, transparent), transparent 72%),
    radial-gradient(ellipse 60% 90% at 35% 60%, color-mix(in srgb, var(--azul-500) 50%, transparent), transparent 72%),
    radial-gradient(ellipse 60% 90% at 65% 40%, color-mix(in srgb, var(--azul-700) 40%, transparent), transparent 72%),
    radial-gradient(ellipse 60% 90% at 50% 45%, var(--azul-700), transparent 72%),
    radial-gradient(ellipse 60% 90% at 30% 30%, var(--neutro-300), transparent 72%),
    radial-gradient(ellipse 60% 90% at 70% 70%, var(--azul-600), transparent 72%),
    radial-gradient(ellipse 60% 90% at 50% 20%, var(--azul-500), transparent 72%),
    linear-gradient(var(--neutro-500) 0%, var(--neutro-300) 100%);
  /* Each colour layer is blown up to 180% and swings around the
     glyph box (the grey base ramp stays put at 100%), so the
     enlarged blobs sweep corner-to-corner through the letters.
     The repaint area is one ~55×47px word — negligible. */
  background-size: 180% 180%, 180% 180%, 180% 180%, 180% 180%,
                   180% 180%, 180% 180%, 180% 180%, 100% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation:
    t-gradient-hue var(--gradient-text-hue-dur) linear infinite,
    t-gradient-drift var(--gradient-text-drift-dur) ease-in-out infinite;
}
/* Full hue cycle — ends where it starts, so the loop is seamless
   and the colour travel is unmistakable. Compositor-only. The
   saturate boost keeps the washes punchy at 180% blow-up. */
@keyframes t-gradient-hue {
  from { filter: hue-rotate(0deg) saturate(1.3); }
  to   { filter: hue-rotate(-360deg) saturate(1.3); }
}
/* Blob travel — perimeter orbit. Each blob is re-centred inside
   its own SVG tile (translation 33.5 21 above) and pinned to the
   ring of edge stops TL,T,TR,R,BR,B,BL,L. Every blob starts on
   the stop nearest its Figma quadrant and advances two ring
   stops per keyframe — a full lap around the text outline per
   cycle, so colour hugs and travels the edges while the middle
   keeps the grey ramp. Last layer (grey ramp) never moves. */
@keyframes t-gradient-drift {
  0%, 100% {
    background-position:
      100% 0%, 0% 50%, 100% 50%, 0% 100%,
      0% 0%, 50% 0%, 50% 100%, 0 0;
  }
  25% {
    background-position:
      100% 100%, 50% 0%, 50% 100%, 0% 0%,
      100% 0%, 100% 50%, 0% 50%, 0 0;
  }
  50% {
    background-position:
      0% 100%, 100% 50%, 0% 50%, 100% 0%,
      100% 100%, 50% 100%, 50% 0%, 0 0;
  }
  75% {
    background-position:
      0% 0%, 50% 100%, 50% 0%, 100% 100%,
      0% 100%, 0% 50%, 100% 50%, 0 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .t-gradient-text { animation: none; }
}

/* ==================== PRO 10 · smoky dissolve ==================== */
/* PRO6 — Delete image with smoky dissolve                       */
/* ============================================================ */
/* Clip the stage so the falling, shredding card dissolves inside
   its own cell instead of dropping over the next prototype. */
.t-smoky-stage {
  overflow: hidden;
  border-radius: 16px;
}

.t-smoky-card {
  position: relative;
  width: var(--smoky-size);
  height: var(--smoky-size);
  border-radius: 16px;
  overflow: hidden;
  background: var(--neutro-100);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--azul-900) 12%, transparent);
  /* No SVG/CSS filter here: WebKit renders SVG filters on the
     CPU (and doesn't reliably repaint animated filter
     primitives), so the dissolve is drawn on the .t-smoky-canvas
     overlay instead. The resting card stays a cheap composited
     layer. */
  will-change: transform, opacity;
}
/* Dissolve render target — JS sizes and positions it over the
   card (+ padding for the shreds' spill) at dissolve start, and
   drives the fall/sway/spin/fade with CSS transform/opacity on
   the element so the motion runs on the compositor (GPU) even
   while a texture frame is still being drawn. Transparent and
   inert outside a run. */
.t-smoky-canvas {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  will-change: transform, opacity;
}

.t-smoky-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* Quick soft re-entry after the dissolve, so the demo replays. */
.t-smoky-card.is-respawning {
  animation: t-smoky-respawn 250ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes t-smoky-respawn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

/* Delete chip pinned to the image's top-left corner. Lives inside
   the card, so it shreds and falls along with it. */
.t-smoky-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--neutro-0) 92%, transparent);
  color: var(--neutro-800);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 1px 3px color-mix(in srgb, var(--azul-900) 25%, transparent);
  -webkit-tap-highlight-color: transparent;
  transition: background-color 120ms ease;
}
.t-smoky-delete:hover { background: var(--neutro-0); }
.t-smoky-delete:focus-visible {
  outline: 2px solid var(--neutro-800);
  outline-offset: 2px;
}
.t-smoky-delete svg { display: block; }

/* ==================== PRO 11 · spinner check morph ==================== */
/* Cross-blur wrapper: blurs the badge as ONE surface, so every layer
   softens together through the morph and resolves crisp — a genuine
   cross-blur, not a one-way blur on a single layer. It must be a
   SEPARATE element: CSS `filter` is applied BEFORE `mask`/clipping, so
   blurring a masked layer does nothing, and filtering the badge itself
   would also blur its own scale/translate compositing. */
.t-check-blur-wrap {
  display: inline-flex;
  filter: blur(0);
  transition: filter var(--check-revert-dur) var(--check-revert-ease);
  will-change: filter;
}
.t-check-blur-wrap.is-crossing {
  filter: blur(var(--check-blur));
  transition: filter calc(var(--check-fill-dur) * 0.45) var(--check-fill-ease);
}

/* The badge scales 22 → 24 (the done size) with the pop ease and hops
   vertically. Both live here so the ring, fill and check compose
   underneath as one object. */
.t-check-badge {
  position: relative;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  scale: 1;
  transition: scale var(--check-revert-dur) var(--check-revert-ease);
  will-change: scale, transform;
}
.t-check-badge[data-state="done"] {
  scale: var(--check-pop-scale);   /* 22 → 24, the done size */
  transition: scale var(--check-pop-dur) var(--check-pop-ease);
  /* TWO-PHASE HOP, independently controllable: up, then down, as two
     animations where the second is DELAYED by the first's duration.
     fill-mode is `forwards` (NOT `both`) — with `both` the delayed
     down-animation would apply its `from` state immediately and yank
     the badge up before the rise had a chance to play.
     Longhands, not the `animation` shorthand: WebKit mis-parses
     `var()` inside the shorthand and falls back to 0s. */
  animation-name: t-check-pop-up, t-check-pop-down;
  animation-duration: var(--check-up-dur), var(--check-down-dur);
  animation-timing-function: var(--check-up-ease), var(--check-down-ease);
  animation-delay: 0ms, var(--check-up-dur);
  animation-fill-mode: forwards, forwards;
}
/* Classic `transform` keyframes, NOT the individual `translate:`
   property — WebKit's support for individual transform properties
   inside @keyframes is recent and inconsistent, and the hop felt wrong
   in Safari. The `scale` property composes with `transform`, so the
   badge's scale transition above is unaffected. */
@keyframes t-check-pop-up {
  from { transform: translateY(0); }
  to   { transform: translateY(calc(var(--check-hop, 3px) * -1)); }
}
@keyframes t-check-pop-down {
  from { transform: translateY(calc(var(--check-hop, 3px) * -1)); }
  to   { transform: translateY(0); }
}

/* Track ring — the light circle. It never morphs; the green disc
   simply fades in over it while it fades out. */
.t-check-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: var(--check-ring-w) solid color-mix(in srgb, var(--azul-900) 10%, transparent);
  transition: opacity var(--check-revert-dur) ease,
              filter var(--check-revert-dur) ease;
}
.t-check-badge[data-state="done"] .t-check-ring {
  opacity: 0;
  transition: opacity calc(var(--check-fill-dur) * 0.7) ease;
}

/* Green disc — it fades IN (opacity) rather than growing a stroke or
   flooding through a mask. Same read, far less machinery, and the fade
   is trivially tunable. */
.t-check-fill {
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  background: var(--check-green);
  /* Two declarations on purpose: p3-capable browsers take the second,
     everyone else keeps the sRGB rgb-() fallback above it. */
  box-shadow:
    0 0 0 0.504px color-mix(in srgb, var(--azul-900) 5%, transparent) inset,
    0 0.504px 0.504px 0 color-mix(in srgb, var(--azul-900) 10%, transparent),
    0 0.504px 2.016px 0 color-mix(in srgb, var(--azul-900) 8%, transparent),
    0 -0.504px 0.504px 0 color-mix(in srgb, var(--azul-900) 9%, transparent) inset;
  box-shadow:
    0 0 0 0.504px color-mix(in srgb, var(--azul-900) 5%, transparent) inset,
    0 0.504px 0.504px 0 color-mix(in srgb, var(--azul-900) 10%, transparent),
    0 0.504px 2.016px 0 color-mix(in srgb, var(--azul-900) 8%, transparent),
    0 -0.504px 0.504px 0 color-mix(in srgb, var(--azul-900) 9%, transparent) inset;
  opacity: 0;
  transition: opacity var(--check-revert-dur) var(--check-revert-ease);
  will-change: opacity;
}
.t-check-badge[data-state="done"] .t-check-fill {
  opacity: 1;
  transition: opacity var(--check-fill-dur) var(--check-fill-ease);
}

/* Lead arc — the dark highlight, on its own layer so the morph never
   TRANSFORMS it: when the fill starts, the spin simply pauses in place
   and the arc fades out. (Transforming it — scaling or rotating it into
   the check — fought the morph and read as two things happening.) */
.t-check-arc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: var(--check-ring-w) solid transparent;
  border-top-color: var(--neutro-500);
  animation-name: t-check-spin;
  animation-duration: var(--check-spin-dur);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  transition: opacity var(--check-revert-dur) var(--check-revert-ease);
  will-change: transform;
}
@keyframes t-check-spin {
  to { transform: rotate(360deg); }
}
.t-check-badge[data-state="done"] .t-check-arc {
  opacity: 0;
  animation-play-state: paused;
  transition: opacity calc(var(--check-fill-dur) * 0.5) ease;
}

/* Check overlay — the svg fills the badge box (22 × 1.09 = the 24px
   done disc), so the 24-viewBox check renders at exactly design size. */
.t-check-disc {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.t-check-disc svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Check path — a stroke-dashoffset draw. The dash length is calibrated
   from the real path length in JS (getTotalLength), so the draw never
   over- or under-shoots; the 20 fallback only covers the first frame. */
.t-check-mark {
  fill: none;
  stroke: var(--neutro-0);
  stroke-width: var(--check-mark-w);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--check-mark-len, 20);
  stroke-dashoffset: var(--check-mark-len, 20);
  transition: stroke-dashoffset var(--check-revert-dur) var(--check-revert-ease);
}
.t-check-badge[data-state="done"] .t-check-mark {
  stroke-dashoffset: 0;
  /* Sequenced, not queued: the draw takes over while the green is still
     arriving — 200ms BEFORE the fill completes, plus the draw delay. It
     reads as one connected gesture instead of two steps. */
  transition: stroke-dashoffset var(--check-draw-dur) var(--check-draw-ease)
    calc(var(--check-fill-dur) + var(--check-draw-delay) - 200ms);
}

/* Row chrome — optional, matches the demo layout. */
.t-check-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.t-check-texts {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.t-check-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 13px;
}
.t-check-sub {
  font-size: 13px;
  font-weight: 400;
  line-height: 13px;
  opacity: 0.5;
}

/* Reduced motion: no spin, no hop, no blur — the badge jumps straight
   to the drawn check. */
@media (prefers-reduced-motion: reduce) {
  .t-check-arc { animation: none !important; }
  .t-check-blur-wrap,
  .t-check-blur-wrap.is-crossing {
    filter: none !important;
    transition: none !important;
  }
  .t-check-ring, .t-check-arc, .t-check-fill { transition: none !important; }
  .t-check-badge, .t-check-mark {
    transition: none !important;
    animation: none !important;
  }
  .t-check-badge[data-state="done"] .t-check-mark { stroke-dashoffset: 0; }
}

