/* ==========================================================================
   RECREATE DESIGN SYSTEM, TOKENS (SYSTEM LAYER)
   --------------------------------------------------------------------------
   Brand-neutral. This file holds structure: neutrals, scales, semantics,
   spacing, shadows, motion. It does NOT define the brand identity.

   Load order in any project:
       <link rel="stylesheet" href="tokens.css">        the system
       <link rel="stylesheet" href="brand-xxx.css">     one brand (the knobs)
       <link rel="stylesheet" href="components.css">    the UI

   A brand file sets the "brand contract": --rc-brand (+700/300/100),
   --rc-accent (+700/300/100), the fonts, and optionally warmer neutrals or
   rounder radii. Everything else derives from those. See brand-recreate.css.
   ========================================================================== */

:root {
  /* ----------------------------------------------------------------------
     DEFAULT NEUTRALS  (a brand may override any of these for warmth/cool)
     ---------------------------------------------------------------------- */
  --rc-white:   #ffffff;
  --rc-paper:   #fbfbfc;   /* app canvas */
  --rc-mist:    #f3f3f6;   /* subtle section fill */
  --rc-fog:     #e7e7ec;   /* hairline / divider */
  --rc-steel:   #9a9aa6;   /* muted UI text, disabled */
  --rc-slate:   #54545f;   /* secondary text */
  --rc-ink:     #131318;   /* primary text */
  --rc-void:    #0a0a0d;   /* deepest black, dark surfaces */

  --rc-success: #11a37f;
  --rc-warning: #e8a93b;
  --rc-danger:  #e23c3c;

  /* ----------------------------------------------------------------------
     SEMANTIC SURFACES & TEXT  (components reference THESE, never raw values)
     --rc-brand / --rc-accent come from the loaded brand file.
     ---------------------------------------------------------------------- */
  --rc-bg:           var(--rc-paper);
  --rc-bg-elevated:  var(--rc-white);
  --rc-bg-sunken:    var(--rc-mist);
  --rc-bg-inverse:   var(--rc-void);

  --rc-text:         var(--rc-ink);
  --rc-text-muted:   var(--rc-slate);
  --rc-text-subtle:  var(--rc-steel);
  --rc-text-inverse: var(--rc-white);
  --rc-text-brand:   var(--rc-brand);     /* links / accents */
  --rc-text-spark:   var(--rc-accent);    /* the small pop, used sparingly */
  --rc-on-brand:     var(--rc-white);     /* text/icon on a brand-colored fill */
  --rc-on-accent:    var(--rc-white);     /* text/icon on an accent-colored fill (set to ink for light accents like yellow) */

  --rc-border:        var(--rc-fog);
  --rc-border-strong: var(--rc-ink);
  --rc-focus-ring:    var(--rc-brand-300);

  /* ----------------------------------------------------------------------
     TYPOGRAPHY  (font families come from the brand file; these are fallbacks)
     ---------------------------------------------------------------------- */
  --rc-font-body:    system-ui, -apple-system, sans-serif;
  --rc-font-serif:   Georgia, "Times New Roman", serif;
  --rc-font-mono:    ui-monospace, "SFMono-Regular", monospace;
  --rc-font-display: system-ui, sans-serif;

  /* Fluid type scale, 1.250 (major third) */
  --rc-text-2xs:  0.6875rem;
  --rc-text-xs:   0.75rem;
  --rc-text-sm:   0.875rem;
  --rc-text-md:   1rem;
  --rc-text-lg:   1.125rem;
  --rc-text-xl:   clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --rc-text-2xl:  clamp(1.6rem, 1.3rem + 1.4vw, 2.25rem);
  --rc-text-3xl:  clamp(2.1rem, 1.6rem + 2.4vw, 3.25rem);
  --rc-text-4xl:  clamp(2.8rem, 1.9rem + 4.3vw, 5rem);
  --rc-text-5xl:  clamp(3.6rem, 2rem + 7.4vw, 8rem);

  --rc-leading-tight:  0.96;
  --rc-leading-snug:   1.12;
  --rc-leading-normal: 1.55;
  --rc-leading-relaxed:1.75;

  --rc-tracking-tight: -0.03em;
  --rc-tracking-snug:  -0.01em;
  --rc-tracking-wide:  0.16em;
  --rc-tracking-mega:  0.28em;

  --rc-weight-regular: 400;
  --rc-weight-medium:  500;
  --rc-weight-semi:    600;
  --rc-weight-bold:    700;

  /* ----------------------------------------------------------------------
     SPACE  (4px base grid)
     ---------------------------------------------------------------------- */
  --rc-space-0:  0;
  --rc-space-1:  0.25rem;
  --rc-space-2:  0.5rem;
  --rc-space-3:  0.75rem;
  --rc-space-4:  1rem;
  --rc-space-5:  1.5rem;
  --rc-space-6:  2rem;
  --rc-space-7:  3rem;
  --rc-space-8:  4rem;
  --rc-space-9:  6rem;
  --rc-space-10: 8rem;

  /* ----------------------------------------------------------------------
     RADII, BORDERS, SHADOWS, MOTION  (a brand may bump radii for personality)
     ---------------------------------------------------------------------- */
  --rc-radius-xs:   4px;
  --rc-radius-sm:   8px;
  --rc-radius-md:   14px;
  --rc-radius-lg:   22px;
  --rc-radius-xl:   32px;
  --rc-radius-pill: 999px;
  --rc-radius-button: var(--rc-radius-pill);  /* brand knob: button shape */

  --rc-border-hair: 1px;
  --rc-border-bold: 2px;

  --rc-shadow-xs: 0 1px 2px rgba(19,19,24,.06);
  --rc-shadow-sm: 0 2px 8px rgba(19,19,24,.07);
  --rc-shadow-md: 0 12px 30px -12px rgba(19,19,24,.18);
  --rc-shadow-lg: 0 30px 60px -24px rgba(19,19,24,.28);
  --rc-shadow-brand: 0 18px 40px -16px color-mix(in srgb, var(--rc-brand) 42%, transparent);

  --rc-ease:        cubic-bezier(.22, 1, .36, 1);
  --rc-ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --rc-dur-fast:    140ms;
  --rc-dur-base:    260ms;
  --rc-dur-slow:    520ms;

  /* ----------------------------------------------------------------------
     LAYOUT
     ---------------------------------------------------------------------- */
  --rc-container:      1200px;
  --rc-container-wide: 1440px;
  --rc-gutter:         clamp(1.25rem, 0.5rem + 3vw, 4rem);
  --rc-z-nav:     100;
  --rc-z-overlay: 900;
  --rc-z-modal:   1000;
}

/* ==========================================================================
   DARK SURFACE CONTEXT
   Wrap any subtree in [data-theme="dark"] to flip semantic tokens.
   ========================================================================== */
[data-theme="dark"] {
  --rc-bg:           var(--rc-void);
  --rc-bg-elevated:  #16161c;
  --rc-bg-sunken:    #101015;
  --rc-bg-inverse:   var(--rc-white);

  --rc-text:         #f4f4f7;
  --rc-text-muted:   #a9a9b6;
  --rc-text-subtle:  #6e6e7b;
  --rc-text-inverse: var(--rc-ink);
  --rc-text-brand:   var(--rc-brand-300);
  --rc-text-spark:   var(--rc-accent-300);

  --rc-border:        #28282f;
  --rc-border-strong: #f4f4f7;
}

@media (prefers-reduced-motion: reduce) {
  :root { --rc-dur-fast: 0ms; --rc-dur-base: 0ms; --rc-dur-slow: 0ms; }
}

/* ==========================================================================
   BRAND: RECREATE
   The house style. Load after tokens.css, before components.css.
   Uses the default neutrals and radii from tokens.css.
   ========================================================================== */
:root {
  --rc-brand:      #3d59ff;   /* cobalt */
  --rc-brand-700:  #2438c9;
  --rc-brand-300:  #7d92ff;
  --rc-brand-100:  #e6eaff;

  --rc-accent:     #e2197b;   /* magenta, the pop */
  --rc-accent-700: #b3145f;
  --rc-accent-300: #f25c9a;
  --rc-accent-100: #fce0ee;

  --rc-violet:     #9b27c4;   /* Recreate extra */

  --rc-font-body:    "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --rc-font-serif:   "Instrument Serif", Georgia, "Times New Roman", serif;
  --rc-font-mono:    "Space Mono", ui-monospace, "SFMono-Regular", monospace;
  --rc-font-display: "Archivo Black", "Archivo", system-ui, sans-serif;
}

/* ==========================================================================
   RECREATE DESIGN SYSTEM, COMPONENTS
   --------------------------------------------------------------------------
   Reusable UI primitives. Requires tokens.css.

       <link rel="stylesheet" href="tokens.css">
       <link rel="stylesheet" href="components.css">

   Every value derives from a token. Restyle the whole system from tokens.css.
   ========================================================================== */

/* ---- RESET & BASE ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--rc-font-body);
  font-size: var(--rc-text-md);
  line-height: var(--rc-leading-normal);
  color: var(--rc-text);
  background: var(--rc-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--rc-accent); color: var(--rc-on-accent); }

:focus-visible {
  outline: var(--rc-border-bold) solid var(--rc-focus-ring);
  outline-offset: 3px;
  border-radius: var(--rc-radius-xs);
}

/* ---- LAYOUT HELPERS ----------------------------------------------------- */
.rc-container {
  width: 100%;
  max-width: var(--rc-container);
  margin-inline: auto;
  padding-inline: var(--rc-gutter);
}
.rc-container--wide { max-width: var(--rc-container-wide); }

.rc-section { padding-block: var(--rc-space-9); }
.rc-stack > * + * { margin-top: var(--rc-space-4); }
.rc-cluster { display: flex; flex-wrap: wrap; gap: var(--rc-space-3); align-items: center; }

/* ==========================================================================
   TYPOGRAPHY PRIMITIVES
   ========================================================================== */

/* Eyebrow label with trailing rule, your "EXPERTS IN VIRTUAL…____" device */
.rc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--rc-space-3);
  font-family: var(--rc-font-body);
  font-weight: var(--rc-weight-bold);
  font-size: var(--rc-text-2xs);
  letter-spacing: var(--rc-tracking-wide);
  text-transform: uppercase;
  color: var(--rc-text);
}
.rc-eyebrow::after {
  content: "";
  width: clamp(2rem, 6vw, 4.5rem);
  height: 2px;
  background: currentColor;
}
.rc-eyebrow--brand { color: var(--rc-text-brand); }

/* Headline. Clean, sentence case, tight tracking. Calm by default. */
.rc-display {
  font-family: var(--rc-font-body);
  font-weight: var(--rc-weight-medium);
  font-size: var(--rc-text-4xl);
  line-height: var(--rc-leading-snug);
  letter-spacing: var(--rc-tracking-tight);
}
.rc-display--md { font-size: var(--rc-text-3xl); }
.rc-display--sm { font-size: var(--rc-text-2xl); }

/* Serif accent. Use sparingly for one or two words inside a headline. */
.rc-serif { font-family: var(--rc-font-serif); font-style: italic; font-weight: 400; letter-spacing: 0; }

/* The recurring magenta dot accent. The one pop of pink that is left. */
.rc-dot { color: var(--rc-accent); }

/* Gradient-filled text */
.rc-text-grad {
  color: var(--rc-brand);
}

.rc-lead { font-size: var(--rc-text-xl); color: var(--rc-text-muted); line-height: var(--rc-leading-snug); }
.rc-muted { color: var(--rc-text-muted); }
.rc-mono { font-family: var(--rc-font-mono); font-size: 0.85em; }

/* ==========================================================================
   BRAND MARK, the dual-tone logo ring
   ========================================================================== */
.rc-logo { display: inline-flex; align-items: center; gap: var(--rc-space-2);
  font-family: var(--rc-font-body); font-weight: var(--rc-weight-semi);
  letter-spacing: -0.01em; font-size: var(--rc-text-lg); }
.rc-logo__ring {
  width: 1.05em; height: 1.05em; border-radius: 50%;
  background: linear-gradient(125deg, var(--rc-brand) 0 70%, var(--rc-accent) 70% 100%);
  -webkit-mask: radial-gradient(closest-side, transparent 56%, #000 58%);
          mask: radial-gradient(closest-side, transparent 56%, #000 58%);
  flex: none;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.rc-btn {
  --_pad-y: 0.8em; --_pad-x: 1.4em;
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--rc-space-2);
  padding: var(--_pad-y) var(--_pad-x);
  font-family: var(--rc-font-body);
  font-weight: var(--rc-weight-semi);
  font-size: var(--rc-text-sm);
  letter-spacing: var(--rc-tracking-snug);
  line-height: 1;
  border: var(--rc-border-bold) solid transparent;
  border-radius: var(--rc-radius-button);
  cursor: pointer;
  transition: transform var(--rc-dur-fast) var(--rc-ease),
              box-shadow var(--rc-dur-base) var(--rc-ease),
              background var(--rc-dur-base) var(--rc-ease),
              color var(--rc-dur-base) var(--rc-ease),
              border-color var(--rc-dur-base) var(--rc-ease);
}
.rc-btn:active { transform: translateY(1px) scale(.99); }
.rc-btn:disabled { opacity: .45; cursor: not-allowed; }
.rc-btn .rc-btn__arrow { transition: transform var(--rc-dur-base) var(--rc-ease); }
.rc-btn:hover .rc-btn__arrow { transform: translateX(4px); }

/* Primary, the signature gradient */
.rc-btn--primary {
  background: var(--rc-brand);
  color: var(--rc-on-brand);
  box-shadow: var(--rc-shadow-brand);
}
.rc-btn--primary:hover { background: var(--rc-brand-700); box-shadow: 0 22px 48px -14px color-mix(in srgb, var(--rc-brand) 50%, transparent); transform: translateY(-2px); }

/* Solid ink */
.rc-btn--solid { background: var(--rc-ink); color: var(--rc-white); }
.rc-btn--solid:hover { background: var(--rc-void); transform: translateY(-2px); box-shadow: var(--rc-shadow-md); }

/* Outline */
.rc-btn--outline { background: transparent; color: var(--rc-text); border-color: var(--rc-border-strong); }
.rc-btn--outline:hover { background: var(--rc-ink); color: var(--rc-white); border-color: var(--rc-ink); }

/* Ghost */
.rc-btn--ghost { background: transparent; color: var(--rc-text); }
.rc-btn--ghost:hover { background: var(--rc-bg-sunken); }

.rc-btn--lg { font-size: var(--rc-text-md); --_pad-y: 1em; --_pad-x: 1.9em; }
.rc-btn--sm { font-size: var(--rc-text-xs); --_pad-y: 0.6em; --_pad-x: 1.1em; }
.rc-btn--block { display: flex; width: 100%; }

/* Underlined link-button with arrow, your "PROJECTS →" */
.rc-link-cta {
  display: inline-flex; align-items: baseline; gap: var(--rc-space-3);
  font-family: var(--rc-font-display); text-transform: uppercase;
  font-size: var(--rc-text-2xl); letter-spacing: var(--rc-tracking-snug);
  border-bottom: 4px solid var(--rc-ink); padding-bottom: 4px;
  transition: gap var(--rc-dur-base) var(--rc-ease), color var(--rc-dur-base) var(--rc-ease);
}
.rc-link-cta:hover { gap: var(--rc-space-5); color: var(--rc-brand); border-color: var(--rc-brand); }

/* ==========================================================================
   BADGES / TAGS / PILLS
   ========================================================================== */
.rc-tag {
  display: inline-flex; align-items: center; gap: var(--rc-space-2);
  padding: 0.35em 0.85em; border-radius: var(--rc-radius-pill);
  font-size: var(--rc-text-xs); font-weight: var(--rc-weight-semi);
  letter-spacing: var(--rc-tracking-snug);
  background: var(--rc-bg-sunken); color: var(--rc-text-muted);
}
.rc-tag--brand   { background: var(--rc-accent-100); color: var(--rc-accent-700); }
.rc-tag--ink     { background: var(--rc-ink); color: var(--rc-white); }
.rc-tag--success { background: color-mix(in srgb, var(--rc-success) 14%, transparent); color: var(--rc-success); }
.rc-tag--dot::before { content:""; width:.5em; height:.5em; border-radius:50%; background: currentColor; }

/* ==========================================================================
   CARDS
   ========================================================================== */
.rc-card {
  position: relative;
  background: var(--rc-bg-elevated);
  border: var(--rc-border-hair) solid var(--rc-border);
  border-radius: var(--rc-radius-lg);
  padding: var(--rc-space-6);
  transition: transform var(--rc-dur-base) var(--rc-ease),
              box-shadow var(--rc-dur-base) var(--rc-ease),
              border-color var(--rc-dur-base) var(--rc-ease);
}
.rc-card--interactive { cursor: pointer; }
.rc-card--interactive:hover { transform: translateY(-6px); box-shadow: var(--rc-shadow-lg); border-color: transparent; }

/* Card whose top edge carries the brand gradient */
.rc-card--accent { overflow: hidden; }
.rc-card--accent::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--rc-brand) 0 70%, var(--rc-accent) 70% 100%);
}

/* Inverse / gradient feature card */
.rc-card--brand {
  background: var(--rc-brand); color: var(--rc-on-brand);
  border-color: transparent; box-shadow: var(--rc-shadow-brand);
}
.rc-card--brand .rc-muted { color: rgba(255,255,255,.78); }

.rc-card__eyebrow { font-size: var(--rc-text-2xs); letter-spacing: var(--rc-tracking-wide);
  text-transform: uppercase; font-weight: var(--rc-weight-bold); color: var(--rc-text-subtle); }
.rc-card__title { font-size: var(--rc-text-xl); font-weight: var(--rc-weight-bold);
  letter-spacing: var(--rc-tracking-snug); margin-top: var(--rc-space-2); }

/* ==========================================================================
   FORMS
   ========================================================================== */
.rc-field { display: flex; flex-direction: column; gap: var(--rc-space-2); }
.rc-label { font-size: var(--rc-text-sm); font-weight: var(--rc-weight-semi); }
.rc-hint  { font-size: var(--rc-text-xs); color: var(--rc-text-subtle); }

.rc-input, .rc-textarea, .rc-select {
  width: 100%;
  padding: 0.85em 1em;
  background: var(--rc-bg-elevated);
  color: var(--rc-text);
  border: var(--rc-border-bold) solid var(--rc-border);
  border-radius: var(--rc-radius-md);
  transition: border-color var(--rc-dur-base) var(--rc-ease),
              box-shadow var(--rc-dur-base) var(--rc-ease);
}
.rc-input::placeholder, .rc-textarea::placeholder { color: var(--rc-text-subtle); }
.rc-input:focus, .rc-textarea:focus, .rc-select:focus {
  outline: none; border-color: var(--rc-brand);
  box-shadow: 0 0 0 4px var(--rc-brand-100);
}
.rc-textarea { min-height: 7rem; resize: vertical; }

/* Inline email-capture row, your footer "Send" form */
.rc-inline-form { display: flex; gap: var(--rc-space-2); flex-wrap: wrap; }
.rc-inline-form .rc-input { flex: 1 1 14rem; }

.rc-toggle { position: relative; display: inline-flex; width: 2.75rem; height: 1.5rem; }
.rc-toggle input { position: absolute; opacity: 0; }
.rc-toggle__track { width: 100%; height: 100%; border-radius: var(--rc-radius-pill);
  background: var(--rc-fog); transition: background var(--rc-dur-base) var(--rc-ease); }
.rc-toggle__track::after { content:""; position:absolute; top:3px; left:3px; width:1.125rem; height:1.125rem;
  border-radius:50%; background: var(--rc-white); box-shadow: var(--rc-shadow-sm);
  transition: transform var(--rc-dur-base) var(--rc-ease); }
.rc-toggle input:checked + .rc-toggle__track { background: var(--rc-brand); }
.rc-toggle input:checked + .rc-toggle__track::after { transform: translateX(1.25rem); }

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.rc-nav {
  position: sticky; top: 0; z-index: var(--rc-z-nav);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--rc-space-5);
  padding: var(--rc-space-4) var(--rc-gutter);
  background: color-mix(in srgb, var(--rc-bg) 82%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: var(--rc-border-hair) solid var(--rc-border);
}
.rc-nav__links { display: flex; gap: var(--rc-space-5); align-items: center; }
.rc-nav__link {
  font-size: var(--rc-text-sm); font-weight: var(--rc-weight-semi);
  letter-spacing: var(--rc-tracking-snug); text-transform: uppercase;
  position: relative; padding-block: 4px;
}
.rc-nav__link::after { content:""; position:absolute; left:0; bottom:0; height:2px; width:0;
  background: var(--rc-brand); transition: width var(--rc-dur-base) var(--rc-ease); }
.rc-nav__link:hover::after, .rc-nav__link[aria-current="page"]::after { width: 100%; }

/* ==========================================================================
   LOGO WALL  (grayscale client strip → colour on hover)
   ========================================================================== */
.rc-logowall { display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: var(--rc-space-7); }
.rc-logowall > * { filter: grayscale(1); opacity: .55; font-weight: var(--rc-weight-bold);
  letter-spacing: var(--rc-tracking-snug); transition: opacity var(--rc-dur-base), filter var(--rc-dur-base); }
.rc-logowall > *:hover { filter: grayscale(0); opacity: 1; }

/* ==========================================================================
   STATS / METRICS
   ========================================================================== */
.rc-stat__value { font-family: var(--rc-font-body); font-weight: var(--rc-weight-medium);
  font-size: var(--rc-text-4xl); line-height: 1; letter-spacing: var(--rc-tracking-tight); }
.rc-stat__label { font-size: var(--rc-text-sm); color: var(--rc-text-muted); margin-top: var(--rc-space-2); }

/* ==========================================================================
   FOOTER  (the signature gradient block)
   ========================================================================== */
.rc-footer { background: var(--rc-brand); color: var(--rc-on-brand); padding-block: var(--rc-space-9); }
.rc-footer a { color: rgba(255,255,255,.82); }
.rc-footer a:hover { color: var(--rc-white); text-decoration: underline; text-underline-offset: 4px; }
.rc-footer__head { font-family: var(--rc-font-display); font-size: var(--rc-text-3xl);
  text-transform: uppercase; line-height: var(--rc-leading-snug); letter-spacing: var(--rc-tracking-snug); }

/* ==========================================================================
   DIVIDERS & UTILITIES
   ========================================================================== */
.rc-rule { border: 0; border-top: var(--rc-border-hair) solid var(--rc-border); }
.rc-rule--ink { border-color: var(--rc-ink); border-top-width: var(--rc-border-bold); }

.rc-grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
}

/* ==========================================================================
   ENTRANCE ANIMATION  (staggered reveal, add data-reveal, JS adds .is-in)
   ========================================================================== */
[data-reveal] { opacity: 0; transform: translateY(22px); }
[data-reveal].is-in { opacity: 1; transform: none;
  transition: opacity var(--rc-dur-slow) var(--rc-ease), transform var(--rc-dur-slow) var(--rc-ease); }

/* ==========================================================================
   APP & ADMIN COMPONENTS
   Data, feedback, navigation, forms and overlays. All theme-aware.
   ========================================================================== */

/* ---- TABLE -------------------------------------------------------------- */
.rc-table-wrap { border: 1px solid var(--rc-border); border-radius: var(--rc-radius-lg);
  overflow: hidden; background: var(--rc-bg-elevated); }
.rc-table { width: 100%; border-collapse: collapse; font-size: var(--rc-text-sm); }
.rc-table th { text-align: left; font-size: var(--rc-text-2xs); text-transform: uppercase; letter-spacing: .1em;
  font-weight: 600; color: var(--rc-text-subtle); padding: var(--rc-space-3) var(--rc-space-4);
  background: var(--rc-bg-sunken); border-bottom: 1px solid var(--rc-border); white-space: nowrap; }
.rc-table td { padding: var(--rc-space-4); border-bottom: 1px solid var(--rc-border); }
.rc-table tbody tr:last-child td { border-bottom: 0; }
.rc-table--hover tbody tr { transition: background var(--rc-dur-fast) var(--rc-ease); }
.rc-table--hover tbody tr:hover { background: var(--rc-bg-sunken); }
.rc-table tr[aria-selected="true"] { background: color-mix(in srgb, var(--rc-brand) 12%, transparent); }
.rc-table--compact th, .rc-table--compact td { padding: var(--rc-space-2) var(--rc-space-3); }
.rc-th-sort { cursor: pointer; }
.rc-th-sort::after { content: " ↕"; color: var(--rc-text-subtle); }

/* ---- PAGINATION --------------------------------------------------------- */
.rc-pagination { display: inline-flex; align-items: center; gap: var(--rc-space-1); }
.rc-pagination button, .rc-pagination a { display: inline-grid; place-items: center; min-width: 2.25rem; height: 2.25rem;
  padding: 0 .6em; border-radius: var(--rc-radius-sm); border: 1px solid transparent; background: transparent;
  color: var(--rc-text); font-size: var(--rc-text-sm); font-weight: 500; cursor: pointer;
  transition: background var(--rc-dur-fast) var(--rc-ease), border-color var(--rc-dur-fast) var(--rc-ease); }
.rc-pagination button:hover, .rc-pagination a:hover { background: var(--rc-bg-sunken); }
.rc-pagination [aria-current="page"] { background: var(--rc-brand); color: var(--rc-on-brand); }
.rc-pagination button:disabled { opacity: .4; cursor: not-allowed; }

/* ---- EMPTY STATE -------------------------------------------------------- */
.rc-empty { text-align: center; padding: var(--rc-space-8) var(--rc-space-5);
  border: 1px dashed var(--rc-border); border-radius: var(--rc-radius-lg); }
.rc-empty__mark { width: 3rem; height: 3rem; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--rc-bg-sunken); color: var(--rc-text-subtle); font-size: 1.4rem; margin-bottom: var(--rc-space-4); }
.rc-empty__title { font-weight: 600; font-size: var(--rc-text-lg); }
.rc-empty__text { color: var(--rc-text-muted); max-width: 36ch; margin: var(--rc-space-2) auto var(--rc-space-5); }

/* ---- KEY-VALUE ---------------------------------------------------------- */
.rc-kv { display: grid; grid-template-columns: max-content 1fr; gap: var(--rc-space-3) var(--rc-space-6); margin: 0; }
.rc-kv dt { color: var(--rc-text-subtle); font-size: var(--rc-text-sm); }
.rc-kv dd { font-weight: 500; margin: 0; }

/* ---- ALERT / CALLOUT ---------------------------------------------------- */
.rc-alert { display: flex; gap: var(--rc-space-3); padding: var(--rc-space-4) var(--rc-space-5);
  border-radius: var(--rc-radius-md); border: 1px solid var(--rc-border); border-left-width: 3px; background: var(--rc-bg-elevated); }
.rc-alert__icon { flex: none; font-weight: 700; }
.rc-alert__title { font-weight: 600; }
.rc-alert__text { color: var(--rc-text-muted); font-size: var(--rc-text-sm); margin-top: 2px; }
.rc-alert--info    { border-left-color: var(--rc-brand);  background: color-mix(in srgb, var(--rc-brand) 7%, var(--rc-bg-elevated)); }
.rc-alert--success { border-left-color: var(--rc-success); background: color-mix(in srgb, var(--rc-success) 8%, var(--rc-bg-elevated)); }
.rc-alert--warning { border-left-color: var(--rc-warning); background: color-mix(in srgb, var(--rc-warning) 10%, var(--rc-bg-elevated)); }
.rc-alert--danger  { border-left-color: var(--rc-danger);  background: color-mix(in srgb, var(--rc-danger) 8%, var(--rc-bg-elevated)); }
.rc-alert--info    .rc-alert__icon { color: var(--rc-brand); }
.rc-alert--success .rc-alert__icon { color: var(--rc-success); }
.rc-alert--warning .rc-alert__icon { color: var(--rc-warning); }
.rc-alert--danger  .rc-alert__icon { color: var(--rc-danger); }

/* ---- TOAST -------------------------------------------------------------- */
.rc-toaster { position: fixed; bottom: var(--rc-space-5); right: var(--rc-space-5); display: flex; flex-direction: column;
  gap: var(--rc-space-2); z-index: var(--rc-z-modal); }
.rc-toast { display: inline-flex; align-items: center; gap: var(--rc-space-3); padding: var(--rc-space-3) var(--rc-space-4);
  background: var(--rc-bg-inverse); color: var(--rc-text-inverse); border-radius: var(--rc-radius-md);
  box-shadow: var(--rc-shadow-lg); font-size: var(--rc-text-sm); font-weight: 500; }
.rc-toast__dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--rc-success); flex: none; }

/* ---- STATUS BADGE ------------------------------------------------------- */
.rc-status { display: inline-flex; align-items: center; gap: .5em; font-size: var(--rc-text-xs);
  font-weight: 600; color: var(--rc-text-muted); }
.rc-status::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--rc-steel); flex: none; }
.rc-status--success::before { background: var(--rc-success); }
.rc-status--warning::before { background: var(--rc-warning); }
.rc-status--danger::before  { background: var(--rc-danger); }
.rc-status--info::before    { background: var(--rc-brand); }

/* ---- PROGRESS ----------------------------------------------------------- */
.rc-progress { height: .5rem; background: var(--rc-bg-sunken); border-radius: var(--rc-radius-pill); overflow: hidden; }
.rc-progress__bar { height: 100%; background: var(--rc-brand); border-radius: inherit;
  transition: width var(--rc-dur-slow) var(--rc-ease); }
.rc-progress--indeterminate .rc-progress__bar { width: 40%; animation: rc-indeterminate 1.3s var(--rc-ease-in-out) infinite; }
@keyframes rc-indeterminate { 0% { transform: translateX(-110%); } 100% { transform: translateX(360%); } }

/* ---- SKELETON ----------------------------------------------------------- */
.rc-skeleton { background: var(--rc-bg-sunken); border-radius: var(--rc-radius-sm); position: relative; overflow: hidden; }
.rc-skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--rc-fog) 70%, transparent), transparent);
  animation: rc-shimmer 1.4s infinite; }
.rc-skeleton--text { height: .8em; margin: .35em 0; }
.rc-skeleton--circle { border-radius: 50%; }
@keyframes rc-shimmer { 100% { transform: translateX(100%); } }

/* ---- SPINNER ------------------------------------------------------------ */
.rc-spinner { width: 1.25rem; height: 1.25rem; border: 2px solid var(--rc-border); border-top-color: var(--rc-brand);
  border-radius: 50%; display: inline-block; animation: rc-spin .7s linear infinite; }
.rc-spinner--lg { width: 2rem; height: 2rem; border-width: 3px; }
@keyframes rc-spin { to { transform: rotate(360deg); } }

/* ---- TABS --------------------------------------------------------------- */
.rc-tabs { display: flex; gap: var(--rc-space-5); border-bottom: 1px solid var(--rc-border); }
.rc-tab { padding: var(--rc-space-3) 0; margin-bottom: -1px; background: none; border: 0; border-bottom: 2px solid transparent;
  font-weight: 500; font-size: var(--rc-text-sm); color: var(--rc-text-muted); cursor: pointer;
  transition: color var(--rc-dur-base) var(--rc-ease), border-color var(--rc-dur-base) var(--rc-ease); }
.rc-tab:hover { color: var(--rc-text); }
.rc-tab[aria-selected="true"] { color: var(--rc-text); border-bottom-color: var(--rc-brand); }

/* ---- BREADCRUMB --------------------------------------------------------- */
.rc-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: var(--rc-space-2);
  list-style: none; padding: 0; margin: 0; font-size: var(--rc-text-sm); color: var(--rc-text-muted); }
.rc-breadcrumb li { display: flex; align-items: center; gap: var(--rc-space-2); }
.rc-breadcrumb li + li::before { content: "/"; color: var(--rc-text-subtle); }
.rc-breadcrumb a:hover { color: var(--rc-brand); }
.rc-breadcrumb [aria-current="page"] { color: var(--rc-text); font-weight: 500; }

/* ---- SEGMENTED CONTROL -------------------------------------------------- */
.rc-segment { display: inline-flex; gap: 2px; padding: 3px; background: var(--rc-bg-sunken); border-radius: var(--rc-radius-md); }
.rc-segment button { border: 0; background: transparent; padding: .45em 1em; border-radius: calc(var(--rc-radius-md) - 3px);
  font-size: var(--rc-text-sm); font-weight: 500; color: var(--rc-text-muted); cursor: pointer;
  transition: background var(--rc-dur-fast) var(--rc-ease), color var(--rc-dur-fast) var(--rc-ease); }
.rc-segment button:hover { color: var(--rc-text); }
.rc-segment button[aria-pressed="true"] { background: var(--rc-bg-elevated); color: var(--rc-text); box-shadow: var(--rc-shadow-xs); }

/* ---- APP SHELL / SIDEBAR ------------------------------------------------ */
.rc-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.rc-shell__main { min-width: 0; }
.rc-sidebar { background: var(--rc-void); border-right: 1px solid var(--rc-border); padding: var(--rc-space-5);
  display: flex; flex-direction: column; gap: var(--rc-space-6); position: sticky; top: 0; height: 100vh; }
.rc-sidebar__link { display: flex; align-items: center; gap: var(--rc-space-3); padding: .65em .9em; border-radius: var(--rc-radius-md);
  font-weight: 500; font-size: var(--rc-text-sm); color: rgba(255,255,255,.62);
  transition: background var(--rc-dur-base) var(--rc-ease), color var(--rc-dur-base) var(--rc-ease); }
.rc-sidebar__link:hover { background: rgba(255,255,255,.06); color: var(--rc-white); }
.rc-sidebar__link.is-active { background: var(--rc-brand); color: var(--rc-on-brand); }
@media (max-width: 880px){ .rc-shell { grid-template-columns: 1fr; } .rc-sidebar { display: none; } }

/* ---- CHECKBOX & RADIO --------------------------------------------------- */
.rc-check, .rc-radio { display: inline-flex; align-items: center; gap: var(--rc-space-2); cursor: pointer; font-size: var(--rc-text-sm); }
.rc-check input, .rc-radio input { accent-color: var(--rc-brand); width: 1.05em; height: 1.05em; cursor: pointer; }

/* ---- SEARCH ------------------------------------------------------------- */
.rc-search { display: inline-flex; align-items: center; gap: var(--rc-space-2); background: var(--rc-bg-elevated);
  border: 2px solid var(--rc-border); border-radius: var(--rc-radius-pill); padding: .5em 1em; }
.rc-search:focus-within { border-color: var(--rc-brand); box-shadow: 0 0 0 4px var(--rc-brand-100); }
.rc-search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; }
.rc-search__icon { color: var(--rc-text-subtle); }

/* ---- MODAL / DIALOG  (use with native <dialog>) ------------------------- */
.rc-modal { margin: auto; border: 0; padding: 0; background: transparent; max-width: min(92vw, 30rem); color: var(--rc-text); }
.rc-modal::backdrop { background: rgba(10,10,13,.5); backdrop-filter: blur(2px); }
.rc-modal__panel { background: var(--rc-bg-elevated); border: 1px solid var(--rc-border); border-radius: var(--rc-radius-lg);
  padding: var(--rc-space-6); box-shadow: var(--rc-shadow-lg); }
.rc-modal__title { font-weight: 600; font-size: var(--rc-text-xl); }
.rc-modal__text { color: var(--rc-text-muted); margin: var(--rc-space-3) 0 var(--rc-space-6); }
.rc-modal__actions { display: flex; justify-content: flex-end; gap: var(--rc-space-3); }

/* ---- DROPDOWN MENU  (use with <details class="rc-menu">) ---------------- */
.rc-menu { position: relative; display: inline-block; }
.rc-menu > summary { list-style: none; cursor: pointer; }
.rc-menu > summary::-webkit-details-marker { display: none; }
.rc-menu__panel { position: absolute; top: calc(100% + 6px); left: 0; min-width: 12rem; z-index: var(--rc-z-overlay);
  background: var(--rc-bg-elevated); border: 1px solid var(--rc-border); border-radius: var(--rc-radius-md);
  box-shadow: var(--rc-shadow-md); padding: var(--rc-space-2); }
.rc-menu[open] .rc-menu__panel { animation: rc-pop var(--rc-dur-fast) var(--rc-ease); }
.rc-menu__item { display: flex; align-items: center; gap: var(--rc-space-3); width: 100%; text-align: left;
  padding: .55em .7em; border: 0; border-radius: var(--rc-radius-sm); background: none; cursor: pointer;
  font-size: var(--rc-text-sm); color: var(--rc-text); }
.rc-menu__item:hover { background: var(--rc-bg-sunken); }
.rc-menu__sep { height: 1px; background: var(--rc-border); margin: var(--rc-space-2) 0; }
@keyframes rc-pop { from { opacity: 0; transform: translateY(-4px); } }

/* ---- TOOLTIP  (add data-rc-tip="..." to any element) -------------------- */
[data-rc-tip] { position: relative; }
[data-rc-tip]:hover::after, [data-rc-tip]:focus-visible::after {
  content: attr(data-rc-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--rc-bg-inverse); color: var(--rc-text-inverse); font-size: var(--rc-text-xs); font-weight: 500;
  white-space: nowrap; padding: .35em .6em; border-radius: var(--rc-radius-sm); pointer-events: none;
  z-index: var(--rc-z-overlay); box-shadow: var(--rc-shadow-sm); }

@media (prefers-reduced-motion: reduce){
  .rc-spinner, .rc-progress--indeterminate .rc-progress__bar, .rc-skeleton::after, .rc-menu[open] .rc-menu__panel { animation: none; }
}

/* ==========================================================================
   ADMIN COMPONENTS, EXTENDED SET
   Forms, overlays/panels, display, navigation/structure. All theme-aware.
   ========================================================================== */

/* ---- FORM VALIDATION & STRUCTURE --------------------------------------- */
.rc-req { color: var(--rc-danger); }
.rc-field__error { color: var(--rc-danger); font-size: var(--rc-text-xs); }
.rc-field__ok    { color: var(--rc-success); font-size: var(--rc-text-xs); }
.rc-field--error  .rc-input, .rc-field--error  .rc-textarea, .rc-field--error  .rc-select { border-color: var(--rc-danger); }
.rc-field--error  .rc-input:focus, .rc-field--error .rc-textarea:focus, .rc-field--error .rc-select:focus {
  border-color: var(--rc-danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--rc-danger) 16%, transparent); }
.rc-field--success .rc-input, .rc-field--success .rc-textarea, .rc-field--success .rc-select { border-color: var(--rc-success); }

.rc-input-group { display: flex; align-items: stretch; overflow: hidden;
  border: var(--rc-border-bold) solid var(--rc-border); border-radius: var(--rc-radius-md); background: var(--rc-bg-elevated); }
.rc-input-group:focus-within { border-color: var(--rc-brand); box-shadow: 0 0 0 4px var(--rc-brand-100); }
.rc-input-group input, .rc-input-group select { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  padding: 0.85em 1em; color: var(--rc-text); }
.rc-input-group__addon { display: grid; place-items: center; padding: 0 .9em; white-space: nowrap;
  background: var(--rc-bg-sunken); color: var(--rc-text-muted); font-size: var(--rc-text-sm); }

.rc-fieldset { border: 0; padding: 0; margin: 0; }
.rc-fieldset__title { font-weight: var(--rc-weight-semi); font-size: var(--rc-text-lg); }
.rc-fieldset__desc { color: var(--rc-text-muted); font-size: var(--rc-text-sm); margin: 2px 0 var(--rc-space-4); }

.rc-range { width: 100%; accent-color: var(--rc-brand); }
.rc-counter { font-size: var(--rc-text-xs); color: var(--rc-text-subtle); text-align: right; }

.rc-dropzone { display: block; text-align: center; cursor: pointer; color: var(--rc-text-muted);
  border: var(--rc-border-bold) dashed var(--rc-border); border-radius: var(--rc-radius-lg); padding: var(--rc-space-7) var(--rc-space-5);
  transition: border-color var(--rc-dur-base) var(--rc-ease), background var(--rc-dur-base) var(--rc-ease); }
.rc-dropzone:hover, .rc-dropzone--drag { border-color: var(--rc-brand); background: color-mix(in srgb, var(--rc-brand) 5%, transparent); }
.rc-dropzone input { display: none; }
.rc-dropzone__mark { font-size: 1.6rem; color: var(--rc-text-subtle); }

/* ---- DRAWER / SLIDE-OVER  (native <dialog class="rc-drawer">) ----------- */
.rc-drawer { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: 100%; max-width: min(92vw, 27rem);
  border: 0; padding: 0; color: var(--rc-text); background: var(--rc-bg-elevated); box-shadow: var(--rc-shadow-lg);
  translate: 100% 0;
  transition: translate var(--rc-dur-base) var(--rc-ease), overlay var(--rc-dur-base) allow-discrete, display var(--rc-dur-base) allow-discrete; }
.rc-drawer[open] { translate: 0 0; }
@starting-style { .rc-drawer[open] { translate: 100% 0; } }
.rc-drawer::backdrop { background: rgba(10,10,13,.45); }
.rc-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: var(--rc-space-3);
  padding: var(--rc-space-5); border-bottom: 1px solid var(--rc-border); }
.rc-drawer__title { font-weight: var(--rc-weight-semi); font-size: var(--rc-text-lg); }
.rc-drawer__body { padding: var(--rc-space-5); overflow: auto; }
.rc-drawer__foot { display: flex; justify-content: flex-end; gap: var(--rc-space-3);
  padding: var(--rc-space-5); border-top: 1px solid var(--rc-border); }

/* ---- POPOVER  (use with <details class="rc-popover">) ------------------- */
.rc-popover { position: relative; display: inline-block; }
.rc-popover > summary { list-style: none; cursor: pointer; }
.rc-popover > summary::-webkit-details-marker { display: none; }
.rc-popover__panel { position: absolute; top: calc(100% + 8px); left: 0; z-index: var(--rc-z-overlay);
  min-width: 14rem; max-width: 20rem; padding: var(--rc-space-5);
  background: var(--rc-bg-elevated); border: 1px solid var(--rc-border); border-radius: var(--rc-radius-md); box-shadow: var(--rc-shadow-md); }
.rc-popover[open] .rc-popover__panel { animation: rc-pop var(--rc-dur-fast) var(--rc-ease); }

/* ---- BANNER  (page-wide strip) ------------------------------------------ */
.rc-banner { display: flex; align-items: center; gap: var(--rc-space-3); padding: var(--rc-space-3) var(--rc-space-5);
  font-size: var(--rc-text-sm); font-weight: var(--rc-weight-medium); }
.rc-banner a { text-decoration: underline; text-underline-offset: 3px; }
.rc-banner__close { margin-left: auto; border: 0; background: none; color: inherit; cursor: pointer; opacity: .75; font-size: 1.1em; }
.rc-banner__close:hover { opacity: 1; }
.rc-banner--brand   { background: var(--rc-brand); color: var(--rc-on-brand); }
.rc-banner--info    { background: var(--rc-brand-100); color: var(--rc-brand-700); }
.rc-banner--warning { background: color-mix(in srgb, var(--rc-warning) 18%, transparent); color: var(--rc-text); }
.rc-banner--danger  { background: var(--rc-danger); color: var(--rc-white); }

/* ---- LOADING OVERLAY  (on a position:relative container) ---------------- */
.rc-loading { position: absolute; inset: 0; z-index: var(--rc-z-overlay); display: grid; place-items: center;
  border-radius: inherit; background: color-mix(in srgb, var(--rc-bg-elevated) 65%, transparent); backdrop-filter: blur(1px); }

/* ---- AVATAR ------------------------------------------------------------- */
.rc-avatar { position: relative; flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: grid; place-items: center; font-weight: var(--rc-weight-bold); font-size: .85rem;
  background: var(--rc-brand-100); color: var(--rc-brand-700); }
.rc-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.rc-avatar--sm { width: 1.75rem; height: 1.75rem; font-size: .68rem; }
.rc-avatar--lg { width: 3.25rem; height: 3.25rem; font-size: 1.05rem; }
.rc-avatar__dot { position: absolute; right: -1px; bottom: -1px; width: .7rem; height: .7rem; border-radius: 50%;
  background: var(--rc-success); border: 2px solid var(--rc-bg-elevated); }
.rc-avatar-group { display: flex; }
.rc-avatar-group > .rc-avatar { margin-left: -.55rem; box-shadow: 0 0 0 2px var(--rc-bg-elevated); }
.rc-avatar-group > .rc-avatar:first-child { margin-left: 0; }

/* ---- BADGE & CHIP ------------------------------------------------------- */
.rc-badge { display: inline-grid; place-items: center; min-width: 1.3rem; height: 1.3rem; padding: 0 .4em; line-height: 1;
  border-radius: var(--rc-radius-pill); background: var(--rc-brand); color: var(--rc-on-brand);
  font-size: var(--rc-text-2xs); font-weight: var(--rc-weight-bold); }
.rc-badge--danger  { background: var(--rc-danger); }
.rc-badge--neutral { background: var(--rc-steel); }
.rc-badge--dot { min-width: .6rem; height: .6rem; padding: 0; }

.rc-chip { display: inline-flex; align-items: center; gap: .4em; padding: .3em .4em .3em .8em;
  border-radius: var(--rc-radius-pill); background: var(--rc-bg-sunken); color: var(--rc-text);
  font-size: var(--rc-text-xs); font-weight: var(--rc-weight-medium); }
.rc-chip__x { display: grid; place-items: center; width: 1.1rem; height: 1.1rem; border: 0; border-radius: 50%;
  background: transparent; color: var(--rc-text-subtle); cursor: pointer; line-height: 1; font-size: 1.05em;
  transform: translateY(-1px); }
.rc-chip__x:hover { background: var(--rc-fog); color: var(--rc-text); }

/* ---- LIST GROUP --------------------------------------------------------- */
.rc-list { background: var(--rc-bg-elevated); border: 1px solid var(--rc-border); border-radius: var(--rc-radius-lg); overflow: hidden; }
.rc-list__item { display: flex; align-items: center; gap: var(--rc-space-3); padding: var(--rc-space-4); border-bottom: 1px solid var(--rc-border); }
.rc-list__item:last-child { border-bottom: 0; }
.rc-list--hover .rc-list__item { cursor: pointer; transition: background var(--rc-dur-fast) var(--rc-ease); }
.rc-list--hover .rc-list__item:hover { background: var(--rc-bg-sunken); }
.rc-list__title { font-weight: var(--rc-weight-semi); }
.rc-list__sub { color: var(--rc-text-muted); font-size: var(--rc-text-sm); }
.rc-list__spacer { margin-left: auto; }

/* ---- ACCORDION  (use with <details class="rc-accordion__item">) --------- */
.rc-accordion { background: var(--rc-bg-elevated); border: 1px solid var(--rc-border); border-radius: var(--rc-radius-lg); overflow: hidden; }
.rc-accordion__item { border-bottom: 1px solid var(--rc-border); }
.rc-accordion__item:last-child { border-bottom: 0; }
.rc-accordion__item > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--rc-space-3);
  padding: var(--rc-space-4) var(--rc-space-5); font-weight: var(--rc-weight-semi); cursor: pointer; list-style: none; }
.rc-accordion__item > summary::-webkit-details-marker { display: none; }
.rc-accordion__item > summary::after { content: "›"; color: var(--rc-text-subtle); transition: transform var(--rc-dur-base) var(--rc-ease); }
.rc-accordion__item[open] > summary::after { transform: rotate(90deg); }
.rc-accordion__body { padding: 0 var(--rc-space-5) var(--rc-space-5); color: var(--rc-text-muted); }

/* ---- TIMELINE ----------------------------------------------------------- */
.rc-timeline { display: flex; flex-direction: column; }
.rc-timeline__item { position: relative; display: grid; grid-template-columns: auto 1fr; gap: var(--rc-space-4); padding-bottom: var(--rc-space-5); }
.rc-timeline__item::before { content: ""; position: absolute; left: .43rem; top: 1.1rem; bottom: -.2rem; width: 2px; background: var(--rc-border); }
.rc-timeline__item:last-child::before { display: none; }
.rc-timeline__dot { width: .95rem; height: .95rem; border-radius: 50%; margin-top: .2rem; z-index: 1;
  background: var(--rc-brand); box-shadow: 0 0 0 4px var(--rc-bg); }
.rc-timeline__time { font-family: var(--rc-font-mono); font-size: var(--rc-text-2xs); color: var(--rc-text-subtle); }
.rc-timeline__title { font-weight: var(--rc-weight-semi); }

/* ---- CODE & KBD --------------------------------------------------------- */
.rc-code { display: block; font-family: var(--rc-font-mono); font-size: var(--rc-text-sm); line-height: 1.6; color: var(--rc-text);
  background: var(--rc-bg-sunken); border: 1px solid var(--rc-border); border-radius: var(--rc-radius-md); padding: var(--rc-space-4);
  overflow: auto; white-space: pre; }
.rc-code--inline { display: inline; padding: .1em .4em; white-space: normal; }
.rc-kbd { font-family: var(--rc-font-mono); font-size: var(--rc-text-xs); background: var(--rc-bg-elevated);
  border: 1px solid var(--rc-border); border-bottom-width: 2px; border-radius: var(--rc-radius-sm); padding: .12em .45em; box-shadow: var(--rc-shadow-xs); }

/* ---- PAGE HEADER, TOOLBAR, TOPBAR --------------------------------------- */
.rc-pageheader { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--rc-space-4); flex-wrap: wrap; }
.rc-pageheader__title { font-weight: var(--rc-weight-semi); font-size: var(--rc-text-2xl); letter-spacing: var(--rc-tracking-tight); }
.rc-pageheader__actions { display: flex; align-items: center; gap: var(--rc-space-3); flex-wrap: wrap; }

.rc-toolbar { display: flex; align-items: center; gap: var(--rc-space-3); flex-wrap: wrap;
  padding: var(--rc-space-3) var(--rc-space-4); background: var(--rc-bg-elevated); border: 1px solid var(--rc-border); border-radius: var(--rc-radius-md); }
.rc-toolbar__spacer { margin-left: auto; }

.rc-topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--rc-space-4);
  padding: var(--rc-space-4) var(--rc-space-5); background: var(--rc-bg-elevated); border-bottom: 1px solid var(--rc-border); }
.rc-topbar__title { font-weight: var(--rc-weight-semi); font-size: var(--rc-text-lg); letter-spacing: var(--rc-tracking-snug); }

/* ---- STEPPER / WIZARD --------------------------------------------------- */
.rc-steps { display: flex; align-items: center; gap: var(--rc-space-2); flex-wrap: wrap; }
.rc-step { display: flex; align-items: center; gap: var(--rc-space-3); }
.rc-step__no { flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center;
  font-size: var(--rc-text-sm); font-weight: var(--rc-weight-bold); background: var(--rc-bg-sunken); color: var(--rc-text-subtle); }
.rc-step__label { font-size: var(--rc-text-sm); font-weight: var(--rc-weight-semi); color: var(--rc-text-muted); }
.rc-step__line { width: 2.5rem; height: 2px; background: var(--rc-border); }
.rc-step--active .rc-step__no, .rc-step--done .rc-step__no { background: var(--rc-brand); color: var(--rc-on-brand); }
.rc-step--active .rc-step__label, .rc-step--done .rc-step__label { color: var(--rc-text); }

/* ---- CONFIRM ICON (optional inside .rc-modal) --------------------------- */
.rc-modal__icon { width: 2.75rem; height: 2.75rem; border-radius: 50%; display: grid; place-items: center; margin-bottom: var(--rc-space-4);
  font-weight: var(--rc-weight-bold); background: color-mix(in srgb, var(--rc-danger) 12%, transparent); color: var(--rc-danger); }

@media (prefers-reduced-motion: reduce){
  .rc-drawer, .rc-popover[open] .rc-popover__panel, .rc-accordion__item > summary::after { transition: none; animation: none; }
}
