/* Raidu - Radius, borders, shadows, motion (design-refresh)
   Soft warm shadows (tinted with ink, never neutral gray). Radii aligned to
   Tailwind's default scale (2026-09-16) - "text-lg"/"rounded-xl" etc. should
   mean the same pixel value here as everywhere else built on Tailwind.
   Superseded the brief "Apple-soft, bumped up" scale from earlier the same
   day; that comment is gone because it no longer describes what's here.

   Separation rule: a resting (non-hover, non-interactive) surface picks ONE
   separation mechanism - shadow OR background contrast - not a border and a
   shadow stacked together. Border is reserved for interactive/hover/focus
   states, or flat contexts (table rows, list dividers) where a shadow
   wouldn't make sense. This is the Apple/ChatGPT "outlined vs quiet" tell -
   don't reach for both at once on a card at rest. */

:root {
  --radius-xs:  2px;
  --radius-sm:  4px;   /* chips, small nested icon buttons */
  --radius-badge: 5px; /* small tinted marks, trend indicators, inline status dots */
  --radius-md:  6px;   /* cards, verdict rows */
  --radius-soft:10px;  /* freestanding card widgets (ChangeSummary, ProgressTracker) */
  --radius-lg:  8px;   /* panels, dialogs */
  --radius-xl:  12px;
  --radius-filter-card: 20px; /* Filter Menu inner card */
  --radius-filter-tray: 24px; /* Filter Menu outer tray */
  --radius-decision-card: 16px; /* Decision Inbox card */
  --radius-decision-tray: 22px; /* Decision Inbox tray */
  --radius-full:9999px;
  /* Aliases, same reasoning as colors.css's --success/--block/etc: found
     undefined during the full-package audit. */
  --radius-control: 8px; /* Button, Input, SearchInput - the control-h class
     (cross-design-system audit, 2026-09-20). Deliberately its own value, not
     an alias to --radius-lg: it happens to land on the same 8px as panels
     today, but the two are unrelated and shouldn't drift together if either
     scale changes later. */
  --radius-btn-sm:   10px; /* Button sm radius */
  --radius-btn-lg:   14px; /* Button lg radius */
  --radius-panel:    var(--radius-lg);
  --radius-card:     var(--radius-md);
  /* FilterMenu chip and group-head button radius. Not an alias to any
     existing step (sits between --radius-xl 12px and --radius-lg 8px). */
  --radius-chip:     10px;
  /* Floating card radius: standalone cards that carry their own shadow (not
     embedded table rows or verdict chips). 10px sits between lg(8) and xl(12)
     and matches the affectUI Clean component family. */
  --radius-float:    10px;
  /* Agent Graph node radii - named by role so they don't conflict with shared sizes.
     Lead agent 14px (larger centre node), inner agent 10px, tool/user 8px. */
  --radius-agent-node-lead: 14px;
  --radius-agent-node:      10px;
  --radius-agent-tool:       8px;
  /* Approval family - component-specific radii not covered by the shared scale */
  --radius-approval-icon:   9px;  /* icon tile in ApprovalCard header */
  --radius-approval-avatar: 7px;  /* agent avatar in PermissionRequest */

  /* Screens D: settings-billing card (14px) and onboarding tray/step (20px, 16px).
     Names are screen-scoped rather than generic steps so they don't pollute the
     shared scale if the shared scale is revised. */
  --radius-sb-card:  14px; /* SettingsBillingScreen card */
  --radius-ob-tray:  20px; /* OnboardingScreen outer tray */
  --radius-ob-step:  16px; /* OnboardingScreen step tile (tool logos, template cards) */

  --border-width:   1px;
  --border-width-2: 1.5px;

  /* Shadows - Tailwind's default scale, verbatim (2026-09-16). Was a custom
     ink-tinted set (rgba(24,24,27,...) instead of pure black) - dropped that
     tint too, since matching Tailwind's actual shadow values but keeping a
     custom color isn't really "aligned to Tailwind standards." */
  /* Hairline card shadow: a 0.5px border-ring plus a minimal lift.
     For freestanding widgets (ChangeSummary, ProgressTracker) that float
     without a background-contrast separation from the page. */
  --shadow-card-hairline: 0 0 0 0.5px rgba(0, 0, 0, 0.06), 0 1px 1px -1px rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  /* Focus ring: a solid 3px of --focus-ring (periwinkle-400 in light, 3.6:1 on
     white; periwinkle-200 in dark), so it follows the theme. Was a leftover
     teal from the pre-V3 palette. */
  --shadow-focus: 0 0 0 3px var(--focus-ring);

  /* Control ring - Button's border painted as a box-shadow instead of a real
     `border` (cross-design-system audit, 2026-09-20, the shadcn/Radix
     pattern). A box-shadow ring sits outside the box rather than consuming
     border-box space, so a variant can go from no ring to a 1px ring without
     nudging its content by a pixel.

     Default here is ring-less (just the resting shadow) - each .rds-btn--*
     variant in button.css overrides the whole property with its own ring
     color baked in, it does NOT just set a --ring-color custom property this
     token reads. Custom-property var() references resolve where the
     property is DECLARED, not where it's consumed: a --ring-color set on
     .rds-btn--secondary can't reach back into this :root declaration's
     var() call, because this value was already resolved (against :root,
     where no ring color exists) before it ever inherits down to the button.
     Learned the hard way - shipped once with every button silently
     ring-less because of exactly this.

     Scoped to Button only for now - Input already has a deliberate
     border/shadow split for its focus ring (see Input.tsx) that this would
     need to be composed with carefully before extending there. */
  --shadow-control: var(--shadow-xs);

  /* Hairline shadow: a 0.5px inset ring + soft lift used for standalone
     floating cards (EmailDraft, CommentThread) that float directly on the
     page with no tray. Avoids the heavy box-model border that would shift
     layout; the ring is painted with box-shadow instead. */
  --shadow-hairline: 0 0 0 0.5px rgb(0 0 0 / 0.06), 0 1px 1px -1px rgb(0 0 0 / 0.1), 0 1px 2px 0 rgb(0 0 0 / 0.05);
  /* Popup variant: deeper shadow for menus/popovers that open out of the card. */
  --shadow-hairline-pop: 0 0 0 0.5px rgb(0 0 0 / 0.08), 0 12px 28px -10px rgb(0 0 0 / 0.16), 0 1px 2px 0 rgb(0 0 0 / 0.05);

  /* Semantic shadow tiers (cross-design-system audit, 2026-09-16 - the
     Atlassian pattern: name the shadow by what it's FOR, not just its size,
     so a card and a modal don't end up picking a tier "by feel"). Values
     alias the raw scale above; nothing new to look up, just a name that
     says which surfaces should use it. */
  --shadow-raised:  var(--shadow-sm);  /* cards, interactive elements one layer above the page */
  --shadow-overlay: var(--shadow-xl);  /* modals, drawers, sheets that cover page content */
  /* Scroll-edge depth cue: an inset shadow on the trailing edge of a
     scrollable container (a table body, a long list) hinting there's more
     content past the visible edge - not in Tailwind's scale at all, since
     Tailwind's shadows are all outward drop shadows. */
  --shadow-scroll-edge: inset 0 -8px 8px -4px rgb(0 0 0 / 0.06);

  /* Motion - quick, precise, no bounce.
     Duration -> use-case (cross-design-system audit, 2026-09-16, the Carbon
     pattern: name what each step is FOR, so adding a new component doesn't
     mean guessing between 120/180/260):
       --dur-fast: micro-interactions - checkbox tick, button press, toggle flip
       --dur-base: component transitions - popover open, accordion expand, tab change
       --dur-slow: layout transitions - sheet/drawer slide, modal fade
     Enter/exit convention: entrances use --ease-out at the tier's own
     duration; exits use --ease-in one tier faster (get out of the way
     quicker than things arrive) - e.g. a modal opens over --dur-slow with
     --ease-out, closes over --dur-base with --ease-in. */
  --ease-standard: cubic-bezier(0.2, 0, 0.2, 1); /* @kind other */
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1); /* @kind other */
  /* Spring decelerate: a slightly tighter version of ease-out tuned for menus
     and height expansions that need a snappier initial velocity
     (cubic-bezier(0.22, 1, 0.36, 1) from the affectUI Clean family). */
  --ease-decelerate: cubic-bezier(0.22, 1, 0.36, 1); /* @kind other */
  /* Spring-like ease: decelerates into place with a clean tail.
     Same curve as --badge-slide-ease but named for general use (component
     entrances, progress fills, any "settle into position" animation). */
  --ease-spring:   cubic-bezier(0.22, 1, 0.36, 1); /* @kind other */
  /* Exit counterpart to --ease-out: accelerates away instead of decelerating
     into place, for anything leaving the screen (modal/drawer/toast close). */
  --ease-in:       cubic-bezier(0.4, 0, 1, 1); /* @kind other */
  /* The one deliberate exception to "no bounce": a spring overshoot reads as
     "alive" specifically for something arriving to grab attention (a
     notification badge popping in), where the rest of the system stays
     restrained. Not for anything else - see badge-pop below. */
  --ease-bounce:   cubic-bezier(0.34, 1.36, 0.64, 1); /* @kind other */
  /* Illustration motion curves. Each is distinct from the standard set and
     used across multiple illustration components; hard-coded values inside
     component CSS reference these names so a single edit updates all of them.
       quint-out  fast deceleration (ease-in-quint exit): layer sliding, beam
                  tile hover, cursor snap. Distinct from --ease-out (slower).
       layer      slow, deliberate ease for isometric layer lifts.
       invite     smooth drag-to-slot ease (team-invite).
       lift       card-fan lift/tilt (empty-calendar).
       agent-pop  spring pop for agent team member arrival. */
  --ease-quint-out: cubic-bezier(0.22, 1, 0.36, 1); /* @kind other */
  --ease-layer:     cubic-bezier(0.65, 0, 0.25, 1); /* @kind other */
  --ease-invite:    cubic-bezier(0.7, 0, 0.25, 1);  /* @kind other */
  --ease-lift:      cubic-bezier(0.22, 0.61, 0.36, 1); /* @kind other */
  --ease-agent-pop: cubic-bezier(0.34, 1.4, 0.64, 1); /* @kind other */
  --dur-fast:   120ms; /* @kind other */
  --dur-hover:  160ms; /* @kind other, hover/interactive state micro-transitions */
  /* Quick: hover-state fills, icon-button toggles, and small attachment-row
     transitions - 160ms sits between fast(120) and base(180) and matches the
     affectUI Clean hover transitions exactly. */
  --dur-quick:  160ms; /* @kind other */
  --dur-base:   180ms; /* @kind other */
  --dur-reveal: 220ms; /* @kind other, content fade-in (panel inner opacity, etc.) */
  --dur-slow:   260ms; /* @kind other */
  --dur-expand: 320ms; /* @kind other, panel/accordion expand-collapse and height animations */
  --dur-normal: var(--dur-base); /* @kind other, alias, see radius aliases above */
  /* Component entrance / expansion durations. Slightly longer than --dur-slow
     because accordion and tool-call body panels need the grid-rows expansion
     to feel unhurried rather than snappy. --dur-enter covers status badges,
     copy-done icons, and other "arriving" elements in the 360ms range. */
  --dur-enter:  360ms; /* @kind other, entrance animations (status changes, icons arriving) */
  --dur-expand-body: 380ms; /* @kind other, accordion / collapsible body expansion */
  /* Approval family - durations not on the shared scale */
  --dur-approval-enter:  420ms; /* pending card entrance and resolved row entrance */
  --dur-approval-height: 520ms; /* ApprovalCard height morph when status changes */
  /* Spinner rotation period. Used wherever a loading spinner completes one
     full revolution (tool-call running state, thinking-loader rays). */
  --dur-spinner: 800ms; /* @kind other */
  /* Spring snap easing. A fast deceleration with a subtle overshoot that reads
     as "snapping into place" for collapsibles, pill width glides and status
     transitions. Matches cubic-bezier(0.22, 1, 0.36, 1) exactly.
     Note: --badge-slide-ease carries the same curve but is semantically
     specific to badge entry animations; this token is for general spring use. */
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1); /* @kind other */
  /* Icon tile and small nested radii that fall between --radius-md (6px) and
     --radius-lg (8px). Used for the 26px icon tiles inside cards and other
     small inset containers that look awkward at 8px full rounding. */
  --radius-tile: 7px; /* @kind other */

  /* Longer durations for component-level entrance animations and fill transitions.
     These are intentionally outside the micro-interaction range: they animate
     layout elements arriving, not controls responding to input. They collapse
     to 1ms under prefers-reduced-motion alongside the short tiers above. */
  --dur-enter-card:     520ms; /* card / widget mount (opacity + translateY settle) */
  --dur-enter-row:      640ms; /* staggered row mount (opacity + blur + translateY) */
  --dur-digit-roll:     560ms; /* number digit roll in a counter */
  --dur-progress-fill: 1100ms; /* progress bar fill advance */
  --dur-shine:         1400ms; /* shimmer sweep across a fill bar */

  /* Notification badge - diagonal slide + spring pop-in, transitions.dev
     pattern. Its own scale rather than --dur-*/--ease-standard: the bounce
     and the longer pop/fade durations are tuned specifically for this one
     "arriving to grab attention" moment, not the restrained default motion
     the rest of the system uses. */
  --badge-slide-dur:       260ms; /* @kind other */
  --badge-slide-ease:      cubic-bezier(0.22, 1, 0.36, 1); /* @kind other */
  --badge-pop-dur:         500ms; /* @kind other */
  --badge-pop-ease:        var(--ease-bounce); /* @kind other */
  --badge-pop-close-dur:   180ms; /* @kind other */
  --badge-fade-dur:        400ms; /* @kind other */
  --badge-fade-close-dur:  180ms; /* @kind other */
  --badge-close-ease:      cubic-bezier(0.4, 0, 0.2, 1); /* @kind other */
  --number-dur:            400ms; /* @kind other, AnimatedNumber digit roll */
  --number-ease:           cubic-bezier(0.16, 1, 0.3, 1); /* @kind other, same curve as --ease-out */
  --badge-blur:            2px;

  /* Button morph - width glide + content blur-in + state transitions.
     Tuned to affectUI's values; kept separate from --ease-out because
     control(0.25,1,0.5,1) is deliberately bouncier than --ease-out(0.16,1,0.3,1). */
  --ease-btn-morph:        cubic-bezier(0.25, 1, 0.5, 1); /* label/icon blur-in and width glide */
  --dur-btn-morph:         480ms;    /* label morph duration */
  --dur-btn-morph-icon:    520ms;    /* icon morph (40ms stagger) */
  --dur-btn-shimmer:       1040ms;   /* loading shimmer sweep (650ms base x 1.6) */
  --dur-btn-transition:    160ms;    /* button hover/press state transitions */
  --badge-offset-x:        -8.2px;
  --badge-offset-y:        12.4px;

  /* Motion family: NumberTicker, Skeleton shimmer, TextReveal, GridBackground.
     These run intentionally longer than --dur-slow and live outside that
     scale so slow-motion system UI does not inflate these values (a count-up
     at ~1 s is a deliberate user-visible effect, not a micro-interaction).
     --mot-spring is the spring-like easing shared by ticker and text reveal;
     the value matches the affectUI reference (cubic-bezier(0.22, 1, 0.36, 1)). */
  --mot-ticker-dur:     900ms;  /* NumberTicker count-up total. */
  --mot-shimmer-dur:   1400ms;  /* Skeleton shimmer sweep period. */
  --mot-reveal-dur:     700ms;  /* TextReveal per-word in-animation (affectUI reference). */
  --mot-reveal-stagger:  40ms;  /* TextReveal inter-word stagger (affectUI reference). */
  --mot-spring: cubic-bezier(0.22, 1, 0.36, 1); /* Ticker + reveal easing. */
  /* Segmented Control - spring easing and asymmetric pill-slide timings.
     Named specifically (--seg) so components that want this easing reach for
     it by name rather than copying the cubic-bezier from --badge-slide-ease,
     which happens to share the value but has a different semantic role. */
  --ease-seg:        cubic-bezier(0.22, 1, 0.36, 1); /* @kind other */
  --dur-seg-slide:   380ms; /* @kind other - leading (slow) edge of the pill glide */
  --dur-seg-snap:    270ms; /* @kind other - trailing (fast) edge of the pill glide */
  --shadow-seg-pill: 0 0 0 0.5px rgb(0 0 0 / 0.08), 0 1px 2px rgb(0 0 0 / 0.08), 0 2px 8px -2px rgb(0 0 0 / 0.06);

  /* OTP Input - digit pop, ring glide, and status morph durations.
     Named specifically (--otp) because these run longer than the general
     motion scale and should not be used outside this component. */
  --dur-otp-ring:    260ms; /* @kind other - ring glide from box to box */
  --dur-otp-pop:     280ms; /* @kind other - digit pop-in */
  --dur-otp-morph:   460ms; /* @kind other - success pill morphing */
  --dur-otp-shake:   420ms; /* @kind other - error shake */

  /* Blocks B component durations.
     Named per-component so they never clash with generic scale tokens.
     All collapse to 1ms under prefers-reduced-motion (see the block below). */
  --dur-pp-switch:   380ms; /* Pricing Plans billing toggle thumb slide */
  --dur-pp-roll:     520ms; /* Pricing Plans price digit roll-in */
  --dur-pp-details:  460ms; /* Pricing Plans details grid-rows expand/collapse */
  --dur-aw-collapse: 380ms; /* AI Workspace sidebar collapse */
  --dur-gallery-slide:        620ms; /* Agent Gallery panel glide */
  --dur-gallery-screen-fold:  260ms; /* Agent Gallery screen fold-out opacity */
  --dur-gallery-screen-open:  420ms; /* Agent Gallery screen open opacity (with delay) */

  /* Blocks B radii. Named per-component; never redefine a generic step. */
  --radius-pp-card:  14px;  /* Pricing Plans plan card */
  --radius-aw-outer: 20px;  /* AI Workspace shell + Agent Gallery panels */
  /* Date Range Picker, Combobox, Dropzone, StepperForm component durations.
     Named with the component abbreviation so they can be tuned independently
     without touching the shared motion scale. */
  --dur-drp-pick:     380ms; /* date endpoint pop (spring animation) */
  --ease-drp-pick:    cubic-bezier(0.34, 1.56, 0.64, 1); /* bouncier than --ease-bounce for the date pick */
  --dur-cbx-chip:     340ms; /* combobox chip entry/exit */
  --dur-cbx-list:     300ms; /* combobox list height glide */
  --dur-dz-row:       480ms; /* dropzone file row fold-out */
  --dur-sfm-slide:    380ms; /* stepper form pane slide */
  --dur-sfm-height:   320ms; /* stepper form card height glide */
  --dur-sfm-btn:      380ms; /* stepper form primary button width glide */

  /* Compare band fill: accent-tinted background for the DateRangePicker comparison period.
     Both themes measured: 92,103,163 (periwinkle) at 0.08 opacity on --surface passes
     contrast for the hairline edge at 0.4 opacity (3.2:1 against the band). */
  --drp-compare-fill: rgba(92, 103, 163, 0.08);
  --drp-compare-edge: rgba(92, 103, 163, 0.40);

  /* Stacking order - one shared scale so overlay components no longer each
     pick their own arbitrary number (some of which were "big enough to be
     safe" values like 9999/99999 that guaranteed nothing else could ever
     stack above them). Steps of 100 leave room to insert a tier later
     without renumbering everything above it. Anchored transient panels
     (dropdowns/popovers/context menus) sit lowest since they're the
     smallest, most local kind of overlay; toasts and the command palette
     sit highest since both are meant to stay reachable/visible no matter
     what dialog or panel is already open. */
  --z-dropdown:         1000; /* AnchoredMenu, ContextMenu, Popconfirm, legacy-kit DropdownMenu, Sidebar's collapsed-rail flyout */
  --z-sidebar-overlay:  1100; /* Sidebar's mobile off-canvas panel */
  --z-drawer:           1200; /* Drawer, Sheet */
  --z-modal:            1300; /* Modal (Dialog/AlertDialog/ConfirmDialog build on or sit alongside it) */
  --z-command-palette:  1400; /* CommandPalette - reachable over an open modal via its global shortcut */
  --z-toast:            1500; /* Toaster - stays visible regardless of what else is open */
  --z-spotlight:        1600; /* Spotlight, Lightbox - full-viewport media takeover */
  --z-tooltip:          1700; /* Tooltip - a hover hint has to stay legible over whatever it's hovering, dialogs included */
  --z-popover:          2000; /* Popover, RichSelect panel - opened from inside a Drawer or Modal, so it has to clear both */

  /* Boards and panels component family (RDS 7.3).
     Values that have no equal among the durations and easings already defined above.
     Named with the --boards-* prefix (shared) or the component abbreviation (component-specific)
     so a rename in one component cannot silently redefine a generic token another family relies on. */
  --ease-boards-panel:      cubic-bezier(0.32, 0.72, 0.24, 1); /* DelegateBoard + FanoutGrid spring ease */
  --dur-boards-spin:        900ms;  /* DelegateBoard running-task chip spinner rotation period */
  --dur-boards-flip:        480ms;  /* DelegateBoard FLIP card glide (dragged card settling) */
  --dur-fanout-cell-in:     420ms;  /* FanoutGrid cell entrance (staggered pop-in) */
  --dur-fanout-sweep:      1300ms;  /* FanoutGrid running-cell shimmer sweep period */
  --dur-fanout-breathe:    1100ms;  /* FanoutGrid retrying-cell opacity pulse */
  --dur-project-card-fold:  520ms;  /* ProjectCard open/close grid-row fold */
  --dur-comments-shimmer:  1300ms;  /* CommentsPanel running-command text shimmer period */
  --shadow-delegate-lift:   0 0 0 0.5px rgba(0,0,0,0.08), 0 16px 32px -12px rgba(0,0,0,0.25), 0 2px 6px rgba(0,0,0,0.06); /* DelegateBoard dragged ghost card */
}

/* Reduced motion, at the token level (cross-design-system audit, 2026-09-16
   - the Polaris/Carbon pattern). Every duration token collapses to near-zero
   here, so a component that just does `transition: transform var(--dur-base)`
   automatically respects prefers-reduced-motion for free, with no per-
   component media query of its own required. Individual components (badge
   pop, FAB mount) that ALSO inject their own reduced-motion CSS rule for a
   keyframe `animation` (which doesn't read a variable the way `transition`
   duration does) still need that - this covers the transition-duration half
   of the problem, not keyframe animations. 1ms rather than 0ms: some browsers
   skip the transitionend event entirely at exactly 0, which breaks any
   mount/unmount logic timed off that duration (see Drawer.tsx). */
/* Dark theme: hairline shadow flips so the 0.5px outline uses white instead
   of black, and the lift uses a stronger black to punch through the dark surface.
   Must live in effects.css AFTER :root (not colors.css) because colors.css is
   imported first; equal specificity means the later file wins. */
.raidu-dark {
  --shadow-card-hairline:  0 0 0 0.5px rgba(255, 255, 255, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-delegate-lift:  0 0 0 0.5px rgba(255,255,255,0.14), 0 16px 32px -12px rgba(0,0,0,0.7);
  --shadow-card-hairline: 0 0 0 0.5px rgba(255, 255, 255, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --drp-compare-fill: rgba(144, 151, 192, 0.14);
  --drp-compare-edge: rgba(144, 151, 192, 0.55);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 1ms;
    --dur-hover: 1ms;
    --dur-quick: 1ms;
    --dur-base: 1ms;
    --dur-reveal: 1ms;
    --dur-slow: 1ms;
    --dur-expand: 1ms;
    --dur-normal: 1ms;
    --dur-enter-card: 1ms;
    --dur-expand-body: 1ms;
    --dur-spinner: 1ms;
    --badge-slide-dur: 1ms;
    --number-dur: 1ms;
    --badge-pop-dur: 1ms;
    --badge-pop-close-dur: 1ms;
    --badge-fade-dur: 1ms;
    --badge-fade-close-dur: 1ms;
    --dur-btn-morph: 1ms;
    --dur-btn-morph-icon: 1ms;
    --dur-btn-shimmer: 1ms;
    --dur-btn-transition: 1ms;
    --dur-enter: 1ms;
    --dur-enter-row: 1ms;
    --dur-digit-roll: 1ms;
    --dur-progress-fill: 1ms;
    --dur-shine: 1ms;
    --mot-ticker-dur:      1ms;
    --mot-shimmer-dur:     1ms;
    --mot-reveal-dur:      1ms;
    --mot-reveal-stagger:  1ms;
    --dur-boards-spin:     1ms;
    --dur-boards-flip:     1ms;
    --dur-fanout-cell-in:  1ms;
    --dur-fanout-sweep:    1ms;
    --dur-fanout-breathe:  1ms;
    --dur-project-card-fold: 1ms;
    --dur-comments-shimmer:  1ms;
  }
}

/* Dark mode overrides for shadows that depend on dark backgrounds.
   --shadow-focus is restated so a dark island picks up its own --focus-ring. */
.raidu-dark {
  --shadow-focus: 0 0 0 3px var(--focus-ring);
  --shadow-hairline:     0 0 0 0.5px rgb(255 255 255 / 0.1), 0 1px 2px 0 rgb(0 0 0 / 0.4);
  --shadow-hairline-pop: 0 0 0 0.5px rgb(255 255 255 / 0.12), 0 12px 28px -10px rgb(0 0 0 / 0.6), 0 1px 2px 0 rgb(0 0 0 / 0.4);
}

/* Illustration duration tokens. Used only by illustration components; kept
   separate from the product motion scale so they can be tuned independently.
   Collapse to 1ms under reduced-motion alongside the rest of the motion tokens.

   orbit-*   orbital animation periods (enrichment-orbit)
   loop-*    CSS animation loop periods (team-invite, agent-team) */
:root {
  --dur-orbit-inner:  7s;
  --dur-orbit-outer: 22s;
  --dur-loop-invite:  4.4s;
  --dur-illus-layer:  560ms;
  --dur-illus-reveal: 460ms;
  --dur-illus-glow:   420ms;
  --dur-illus-face:   360ms;
  --dur-illus-icon:   300ms;
  --dur-illus-morph:  460ms;
  --dur-illus-travel: 1500ms;
  --dur-illus-ring:   760ms;
  --dur-agent-reveal: 700ms;
  --dur-agent-pop:    520ms;
  --dur-agent-role:   360ms;
  /* Agent Graph / Inbox / Lanes / Queue animation durations.
     Named by component family so they never collide with generic token names. */
  --dur-agent-pulse:   1600ms; /* Needs-you pulse and flag blink */
  --dur-agent-shimmer: 2200ms; /* Running-block sheen sweep */
  --dur-agent-ripple:   720ms; /* Node ripple on pulse arrival */
  --dur-agent-flow:     900ms; /* Hand-off curve dash flow */
  --dur-agent-fold:     460ms; /* Card fold open/close */
  --dur-agent-flip:     560ms; /* FLIP card-move animation */
  --dur-agent-land:    1100ms; /* Job landing in done/failed bin */
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-illus-layer:  1ms;
    --dur-illus-reveal: 1ms;
    --dur-illus-glow:   1ms;
    --dur-illus-face:   1ms;
    --dur-illus-icon:   1ms;
    --dur-illus-morph:  1ms;
    --dur-illus-travel: 1ms;
    --dur-illus-ring:   1ms;
    --dur-agent-reveal: 1ms;
    --dur-agent-pop:    1ms;
    --dur-agent-role:   1ms;
    --dur-agent-pulse:   1ms;
    --dur-agent-shimmer: 1ms;
    --dur-agent-ripple:  1ms;
    --dur-agent-flow:    1ms;
    --dur-agent-fold:    1ms;
    --dur-agent-flip:    1ms;
    --dur-agent-land:    1ms;
    --dur-seg-slide:  1ms;
    --dur-seg-snap:   1ms;
    --dur-otp-ring:   1ms;
    --dur-otp-pop:    1ms;
    --dur-otp-morph:  1ms;
    --dur-otp-shake:  1ms;
    /* Blocks B */
    --dur-pp-switch:   1ms;
    --dur-pp-roll:     1ms;
    --dur-pp-details:  1ms;
    --dur-aw-collapse: 1ms;
    --dur-gallery-slide:        1ms;
    --dur-gallery-screen-fold:  1ms;
    --dur-gallery-screen-open:  1ms;
    --dur-drp-pick:     1ms;
    --dur-cbx-chip:     1ms;
    --dur-cbx-list:     1ms;
    --dur-dz-row:       1ms;
    --dur-sfm-slide:    1ms;
    --dur-sfm-height:   1ms;
    --dur-sfm-btn:      1ms;
  }
}
