/* Shared component classes used across templates (Tailwind CDN handles utilities; this file holds the small set of reusable "components" that would otherwise be repeated as inline <style> blocks on every page). */

.feature-card { border-radius: 1rem; border: 1px solid rgb(226 232 240); padding: 1.75rem; background: #fff; }
html.dark .feature-card { border-color: rgba(255,255,255,0.1); background: rgba(255,255,255,0.03); }
.feature-icon { font-size: 1.75rem; }
.feature-card h3 { font-weight: 700; margin-top: 0.75rem; }
.feature-card p { margin-top: 0.4rem; font-size: 0.875rem; color: rgb(100 116 139); }
html.dark .feature-card p { color: rgb(148 163 184); }

.step-card { border-radius: 1rem; padding: 1.75rem; background: rgb(248 250 252); border: 1px solid rgb(226 232 240); }
html.dark .step-card { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.1); }
.step-number { display:inline-flex; width:2.25rem; height:2.25rem; border-radius:9999px; align-items:center; justify-content:center; background: linear-gradient(135deg,#7c5cff,#ec4899); color:#fff; font-weight:700; font-size:0.9rem; }
.step-card h3 { font-weight:700; margin-top:0.75rem; }
.step-card p { margin-top:0.4rem; font-size:0.875rem; color: rgb(100 116 139); }
html.dark .step-card p { color: rgb(148 163 184); }

.usecase-card { border-radius: 1rem; padding: 1.75rem; text-align:center; font-size:1.75rem; border:1px solid rgb(226 232 240); }
html.dark .usecase-card { border-color: rgba(255,255,255,0.1); }
.usecase-card h3 { font-size:1rem; font-weight:700; margin-top:0.6rem; }
.usecase-card p { margin-top:0.3rem; font-size:0.8rem; color: rgb(100 116 139); }
html.dark .usecase-card p { color: rgb(148 163 184); }

.stat-card { border-radius: 1rem; border: 1px solid rgb(226 232 240); background: #fff; padding: 1.25rem; }
html.dark .stat-card { border-color: rgba(255,255,255,0.1); background: rgba(255,255,255,0.03); }
.stat-label { font-size: 0.8rem; color: rgb(100 116 139); font-weight: 500; }
html.dark .stat-label { color: rgb(148 163 184); }
.stat-value { font-size: 1.75rem; font-weight: 800; margin-top: 0.25rem; font-family: 'Lexend', sans-serif; }

.project-card { display:block; border-radius: 1rem; border: 1px solid rgb(226 232 240); background: #fff; padding: 0.9rem; transition: all .15s; }
html.dark .project-card { border-color: rgba(255,255,255,0.1); background: rgba(255,255,255,0.03); }
.project-card:hover { border-color: rgba(124,92,255,0.5); transform: translateY(-2px); }

.status-badge { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; padding: 0.2rem 0.55rem; border-radius: 9999px; }
.status-ready { background: rgba(16,185,129,0.15); color: #10b981; }
.status-processing { background: rgba(245,158,11,0.15); color: #f59e0b; }
.status-parsing,
.status-validating,
.status-normalizing,
.status-matching { background: rgba(245,158,11,0.15); color: #f59e0b; }
.status-pending { background: rgba(148,163,184,0.2); color: #94a3b8; }
.status-queued { background: rgba(148,163,184,0.2); color: #94a3b8; }
.status-unmatched { background: rgba(148,163,184,0.2); color: #94a3b8; }
.status-failed { background: rgba(239,68,68,0.15); color: #ef4444; }
.status-rejected { background: rgba(239,68,68,0.15); color: #ef4444; }
.status-completed { background: rgba(16,185,129,0.15); color: #10b981; }
.status-confirmed { background: rgba(16,185,129,0.15); color: #10b981; }
.status-modified { background: rgba(56,189,248,0.15); color: #38bdf8; }
.status-pending_review { background: rgba(245,158,11,0.15); color: #f59e0b; }
.status-insufficient_credits,
.status-needs_credits { background: rgba(245,158,11,0.18); color: #d97706; }
.status-draft,
.status-mapping { background: rgba(148,163,184,0.2); color: #94a3b8; }
.status-done { background: rgba(16,185,129,0.15); color: #10b981; }
.status-single { background: rgba(16,185,129,0.15); color: #10b981; }
.status-partial,
.status-multi,
.status-group { background: rgba(245,158,11,0.15); color: #f59e0b; }
.status-payment_only { background: rgba(239,68,68,0.12); color: #ef4444; }
.status-invoice_only { background: rgba(148,163,184,0.2); color: #94a3b8; }

.empty-state { text-align:center; border: 1px dashed rgb(203 213 225); border-radius: 1rem; padding: 3rem 1.5rem; }
html.dark .empty-state { border-color: rgba(255,255,255,0.15); }

.card { border-radius: 1rem; border: 1px solid rgb(226 232 240); background: #fff; }
html.dark .card { border-color: rgba(255,255,255,0.1); background: rgba(255,255,255,0.03); }

.btn-primary { display:inline-flex; align-items:center; justify-content:center; gap:0.5rem; border-radius:9999px; background: #0f172a; color:#fff; font-weight:600; padding: 0.65rem 1.25rem; transition: opacity .15s; }
html.dark .btn-primary { background:#fff; color:#0f172a; }
.btn-primary:hover { opacity: 0.9; }
.btn-secondary { display:inline-flex; align-items:center; justify-content:center; gap:0.5rem; border-radius:9999px; border:1px solid rgb(203 213 225); font-weight:600; padding: 0.6rem 1.2rem; transition: background .15s; }
html.dark .btn-secondary { border-color: rgba(255,255,255,0.15); }
.btn-secondary:hover { background: rgb(241 245 249); }
html.dark .btn-secondary:hover { background: rgba(255,255,255,0.06); }

.input { width:100%; border-radius:0.6rem; border:1px solid rgb(203 213 225); padding:0.6rem 0.85rem; font-size:0.9rem; background:#fff; }
html.dark .input { border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.03); color:#fff; }
.input:focus { outline:none; border-color:#7c5cff; box-shadow: 0 0 0 3px rgba(124,92,255,0.15); }

.settings-tab { display:flex; align-items:center; gap:0.6rem; padding:0.55rem 0.9rem; border-radius:0.6rem; font-weight:500; font-size:0.9rem; color: rgb(100 116 139); }
html.dark .settings-tab { color: rgb(148 163 184); }
.settings-tab:hover { background: rgb(241 245 249); }
html.dark .settings-tab:hover { background: rgba(255,255,255,0.06); }
.settings-tab-active { background: rgba(124,92,255,0.1); color:#7c5cff !important; font-weight:600; }

.nav-link { display:flex; align-items:center; gap:0.65rem; padding:0.55rem 0.75rem; border-radius:0.6rem; color:rgb(71 85 105); font-weight:500; transition:all .15s; }
html.dark .nav-link { color:rgb(148 163 184); }
.nav-link:hover { background-color: rgb(241 245 249); color: rgb(15 23 42); }
html.dark .nav-link:hover { background-color: rgba(255,255,255,0.06); color:#fff; }
.nav-link-active { background: linear-gradient(90deg, rgba(124,92,255,0.15), rgba(236,72,153,0.08)); color: #7c5cff !important; font-weight:600; }

/* Landing "Comment ça marche": real screenshots in a browser-style frame. */
.how-shot { margin: 0; border-radius: 1rem; overflow: hidden; border: 1px solid rgb(226 232 240); background: #fff;
  box-shadow: 0 20px 50px -20px rgba(124, 92, 255, 0.35); }
html.dark .how-shot { border-color: rgba(255,255,255,0.12); box-shadow: 0 20px 50px -20px rgba(124, 92, 255, 0.45); }
.how-shot-bar { display: flex; gap: .35rem; padding: .6rem .8rem; background: rgb(241 245 249); border-bottom: 1px solid rgb(226 232 240); }
html.dark .how-shot-bar { background: rgb(30 30 46); border-bottom-color: rgba(255,255,255,0.1); }
.how-shot-bar span { width: .6rem; height: .6rem; border-radius: 9999px; background: rgb(203 213 225); }
html.dark .how-shot-bar span { background: rgb(71 85 105); }

/* Respect the visitor's "reduce motion" setting: no smooth scrolling, no animated transitions (the public page only uses short fades). */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* =====================================================================================================================
   Public home page — design tokens and components (prefix rc-). Light is the reference theme; html.dark keeps the page usable
   for visitors who chose the dark theme. Everything below is scoped to .rc-page, so no other page is affected.
   Scale: type  h1 clamp(2.1-3.6rem) / h2 clamp(1.65-2.4rem) / h3 1.1rem / body 1rem / small .8125rem
          space 4, 8, 12, 16, 24, 32, 48, 80 px / radius cards 16 px, buttons 12 px, badges pill / max width 72rem
   ===================================================================================================================== */
.rc-page {
  --rc-ink: #0f172a; --rc-ink-2: #334155; --rc-muted: #5b6b82;
  --rc-bg: #ffffff; --rc-soft: #f5f7fb; --rc-line: #e2e8f0;
  --rc-accent: #5a2fd6; --rc-accent-hover: #4826ab; --rc-accent-soft: #f2f1ff; --rc-on-accent: #ffffff;
  --rc-ok: #047857; --rc-ok-soft: #ecfdf5; --rc-warn: #92400e; --rc-warn-soft: #fffbeb; --rc-err: #b91c1c;
  --rc-radius: 1rem; --rc-radius-btn: .75rem;
  --rc-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 12px 28px -18px rgba(15, 23, 42, .18);
  background: var(--rc-bg); color: var(--rc-ink);
}
html.dark .rc-page {
  --rc-ink: #f1f5f9; --rc-ink-2: #cbd5e1; --rc-muted: #94a3b8;
  --rc-bg: #05050a; --rc-soft: #0b0b14; --rc-line: rgba(255, 255, 255, .12);
  --rc-accent: #a99bff; --rc-accent-hover: #c4baff; --rc-accent-soft: rgba(124, 92, 255, .16); --rc-on-accent: #0b0b14;
  --rc-ok: #34d399; --rc-ok-soft: rgba(16, 185, 129, .13); --rc-warn: #fbbf24; --rc-warn-soft: rgba(245, 158, 11, .13); --rc-err: #f87171;
  --rc-shadow: none;
}
.rc-page a:focus-visible, .rc-page button:focus-visible, .rc-page summary:focus-visible, .rc-page [tabindex="0"]:focus-visible {
  outline: 3px solid var(--rc-accent); outline-offset: 3px; border-radius: .5rem;
}
.rc-container { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 640px) { .rc-container { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .rc-container { padding-inline: 2rem; } }
.rc-section { padding-block: clamp(3rem, 7vw, 5rem); }
.rc-section-soft { background: var(--rc-soft); border-block: 1px solid var(--rc-line); }
.rc-anchor { scroll-margin-top: 5rem; }

.rc-eyebrow { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--rc-accent); }
.rc-h1 { font-family: "Lexend", "Inter", sans-serif; font-weight: 700; letter-spacing: -.025em; line-height: 1.08; font-size: clamp(2rem, 4.6vw, 3.25rem); color: var(--rc-ink); }
.rc-h1 .rc-h1-soft { color: var(--rc-accent); display: block; }
.rc-h2 { font-family: "Lexend", "Inter", sans-serif; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; font-size: clamp(1.65rem, 3.4vw, 2.4rem); color: var(--rc-ink); }
.rc-h3 { font-family: "Lexend", "Inter", sans-serif; font-weight: 600; font-size: 1.1rem; line-height: 1.3; color: var(--rc-ink); }
.rc-lead { font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.65; color: var(--rc-ink-2); }
.rc-text { color: var(--rc-ink-2); line-height: 1.6; }
.rc-muted { color: var(--rc-muted); }
.rc-small { font-size: .8125rem; line-height: 1.5; }

.rc-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.75rem; padding: .6rem 1.2rem; border-radius: var(--rc-radius-btn);
  font-weight: 600; font-size: .95rem; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease; }
.rc-btn-primary { background: var(--rc-accent); color: var(--rc-on-accent); }
.rc-btn-primary:hover { background: var(--rc-accent-hover); }
.rc-btn-secondary { background: var(--rc-bg); color: var(--rc-ink); border-color: #cbd5e1; }
html.dark .rc-btn-secondary { border-color: rgba(255, 255, 255, .22); }
.rc-btn-secondary:hover { border-color: var(--rc-accent); color: var(--rc-accent); }
.rc-btn:active:not([disabled]) { transform: translateY(1px); }
.rc-btn[disabled], .rc-btn-disabled { background: var(--rc-soft); color: var(--rc-muted); border-color: var(--rc-line); cursor: not-allowed; }
.rc-btn-block { width: 100%; }
.rc-link { color: var(--rc-accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.rc-link:hover { color: var(--rc-accent-hover); }

.rc-card { background: var(--rc-bg); border: 1px solid var(--rc-line); border-radius: var(--rc-radius); box-shadow: var(--rc-shadow); }
.rc-card-hover { transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.rc-card-hover:hover { border-color: color-mix(in srgb, var(--rc-accent) 45%, var(--rc-line)); transform: translateY(-2px); }

.rc-badge { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 700; line-height: 1.2; border: 1px solid transparent; }
.rc-badge-live { background: var(--rc-ok-soft); color: var(--rc-ok); border-color: color-mix(in srgb, var(--rc-ok) 25%, transparent); }
.rc-badge-soon { background: var(--rc-warn-soft); color: var(--rc-warn); border-color: color-mix(in srgb, var(--rc-warn) 28%, transparent); }
.rc-badge svg { width: .85rem; height: .85rem; }

.rc-tile { display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; border-radius: .8rem; flex: none; }
.rc-tile svg { width: 1.35rem; height: 1.35rem; }
.rc-tone-blue { background: #eff6ff; color: #1d4ed8; }
.rc-tone-green { background: #ecfdf5; color: #047857; }
.rc-tone-amber { background: #fffbeb; color: #b45309; }
.rc-tone-rose { background: #fff1f2; color: #be123c; }
.rc-tone-indigo { background: var(--rc-accent-soft); color: var(--rc-accent); }
.rc-tone-teal { background: #f0fdfa; color: #0f766e; }
html.dark .rc-tone-blue { background: rgba(59, 130, 246, .15); color: #93c5fd; }
html.dark .rc-tone-green { background: rgba(16, 185, 129, .15); color: #6ee7b7; }
html.dark .rc-tone-amber { background: rgba(245, 158, 11, .15); color: #fcd34d; }
html.dark .rc-tone-rose { background: rgba(244, 63, 94, .15); color: #fda4af; }
html.dark .rc-tone-teal { background: rgba(20, 184, 166, .15); color: #5eead4; }

/* "Outils" menu of the signed-in top bar (templates/partials/app_nav.html) */
.rc-nav-tools[data-current] { color: #6a3ff5; border-color: #7c5cff; font-weight: 600; }
html.dark .rc-nav-tools[data-current] { color: #aea5ff; }
.rc-nav-tool-icon { flex: none; display: inline-flex; width: 2rem; height: 2rem; padding: .42rem; border-radius: 9999px; }
.rc-nav-tool-icon svg { width: 100%; height: 100%; }
.rc-nav-tone-violet { background: #efeaff; color: #6a3ff5; } .rc-nav-tone-blue { background: #e8f0ff; color: #2563eb; } .rc-nav-tone-green { background: #e7f8ee; color: #16a34a; }
html.dark .rc-nav-tone-violet { background: rgba(124, 92, 255, .16); color: #a48cff; } html.dark .rc-nav-tone-blue { background: rgba(59, 130, 246, .16); color: #93b4ff; }
html.dark .rc-nav-tone-green { background: rgba(34, 197, 94, .14); color: #4ade80; }

.rc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; align-content: start; }
.rc-list li { display: flex; gap: .6rem; align-items: flex-start; font-size: .95rem; line-height: 1.45; color: var(--rc-ink-2); }
.rc-list li svg { width: 1.1rem; height: 1.1rem; flex: none; margin-top: .15rem; color: var(--rc-ok); }
.rc-list-soon li svg { color: var(--rc-warn); }

/* hero composition: real captures of the application, framed */
.rc-hero { background: radial-gradient(60% 70% at 85% 0%, color-mix(in srgb, var(--rc-accent) 11%, transparent), transparent 70%); }
.rc-shot { margin: 0; border: 1px solid var(--rc-line); border-radius: .9rem; overflow: hidden; background: #fff; box-shadow: 0 24px 48px -28px rgba(15, 23, 42, .35); }
.rc-shot .how-shot-bar { background: var(--rc-soft); border-bottom-color: var(--rc-line); }
.rc-hero-visual { position: relative; }
.rc-shot-second { margin-top: 1rem; }
@media (min-width: 640px) {
  .rc-hero-visual { padding-bottom: 3.5rem; }
  .rc-shot-second { position: absolute; right: -.5rem; bottom: 0; width: 66%; margin-top: 0; }
}
@media (min-width: 1280px) { .rc-shot-second { right: -1.5rem; } }

/* illustrations of the announced tools: conceptual, never a screenshot */
.rc-ill { position: relative; height: 11rem; overflow: hidden; background: var(--rc-soft); border-bottom: 1px dashed var(--rc-line); display: flex; align-items: center; justify-content: center; gap: .9rem; padding: 1rem 1rem 1.9rem; }
.rc-ill-label { position: absolute; left: .75rem; bottom: .55rem; font-size: .6875rem; font-weight: 600; color: var(--rc-muted); letter-spacing: .02em; background: var(--rc-bg); border: 1px solid var(--rc-line); border-radius: 999px; padding: .1rem .55rem; }
.rc-mini { background: var(--rc-bg); border: 1px solid var(--rc-line); border-radius: .6rem; padding: .5rem; display: grid; gap: .3rem; width: 11rem; }
.rc-mini-row { display: flex; align-items: center; gap: .35rem; height: .95rem; border-radius: .3rem; padding-inline: .25rem; }
.rc-mini-row i { display: block; height: .4rem; border-radius: 999px; background: #cbd5e1; }
html.dark .rc-mini-row i { background: rgba(255, 255, 255, .22); }
.rc-mini-row.is-dup { background: var(--rc-warn-soft); outline: 1px solid color-mix(in srgb, var(--rc-warn) 35%, transparent); }
.rc-mini-row.is-dup i { background: color-mix(in srgb, var(--rc-warn) 55%, #fff); }
.rc-mini-head i { background: #94a3b8; height: .45rem; }
.rc-mini-tag { margin-left: auto; font-size: .5625rem; font-weight: 700; color: var(--rc-warn); text-transform: uppercase; letter-spacing: .04em; }
.rc-ill-arrow { color: var(--rc-muted); width: 1.4rem; height: 1.4rem; flex: none; }
.rc-mail { background: var(--rc-bg); border: 1px solid var(--rc-line); border-radius: .6rem; padding: .55rem; display: grid; gap: .35rem; width: 8.5rem; }
.rc-mail i { display: block; height: .4rem; border-radius: 999px; background: #cbd5e1; }
html.dark .rc-mail i { background: rgba(255, 255, 255, .22); }
.rc-chip-attach { display: inline-flex; align-items: center; gap: .25rem; font-size: .5625rem; font-weight: 700; color: var(--rc-ink-2); background: var(--rc-soft); border: 1px solid var(--rc-line); border-radius: .4rem; padding: .15rem .4rem; width: fit-content; }
.rc-chip-attach svg { width: .7rem; height: .7rem; }

.rc-step-num { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 999px; background: var(--rc-accent-soft); color: var(--rc-accent); font-weight: 700; font-family: "Lexend", sans-serif; }
.rc-chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; background: var(--rc-soft); border: 1px solid var(--rc-line); color: var(--rc-ink-2); }
.rc-chip-soon { background: var(--rc-warn-soft); color: var(--rc-warn); border-style: dashed; }

.rc-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--rc-bg) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rc-line); }
.rc-nav a, a.rc-nav { color: var(--rc-ink-2); font-weight: 500; font-size: .95rem; text-decoration: none; padding: .5rem .25rem; }
.rc-nav a:hover, a.rc-nav:hover { color: var(--rc-accent); }
.rc-footer { background: var(--rc-soft); border-top: 1px solid var(--rc-line); }
.rc-fade-in { animation: rc-fade-in .5s ease both; }
@keyframes rc-fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* allauth pages (sign-in, sign-up, verification, password reset, sign-in code) */
.auth-form input[type=email], .auth-form input[type=password], .auth-form input[type=text], .auth-form input[type=tel] { width:100%; border-radius:0.6rem; border:1px solid rgb(203 213 225); padding:0.6rem 0.85rem; font-size:0.9rem; background:#fff; }
html.dark .auth-form input[type=email], html.dark .auth-form input[type=password], html.dark .auth-form input[type=text], html.dark .auth-form input[type=tel] { border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.03); color:#fff; }
.auth-form input:focus { outline:none; border-color:#7c5cff; box-shadow: 0 0 0 3px rgba(124,92,255,0.15); }
.auth-honeypot { position:absolute !important; left:-10000px; width:1px; height:1px; overflow:hidden; }
.auth-card a:not([class]) { color:#7c5cff; text-decoration:underline; }
.auth-entrance h1 { text-align:center; }
.auth-help ul { margin-top:0.25rem; padding-left:1rem; list-style:disc; }
.auth-help li { margin-top:0.1rem; }

/* =========================================================================================================================================
   Hero demonstration player (templates/landing/index.html, static/js/hero_demo.js). Every rule below is scoped to .rc-demo.
   ========================================================================================================================================= */
/* The hero's visual block keeps its wrapper (.rc-hero-visual: the grid cell); the old room reserved for the overlapping second screenshot is not needed. */
.rc-hero-visual.rc-demo { padding-bottom: 0; }

.rc-demo { --demo-frame: 65 / 36; }
@media (max-width: 1023px) { .rc-hero-visual.rc-demo { max-width: 640px; } }       /* stacked layouts: about the room the old captures took */                       /* the films are 1300 x 720 */
.rc-demo * { box-sizing: border-box; }

/* ---- tabs ---------------------------------------------------------------------------------------------------------------------------------------------- */
.rc-demo-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem; margin-bottom: .6rem; }
.rc-demo-tabs[data-count="5"] { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .3rem; }
.rc-demo-tabs[data-count="6"] { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .25rem; }
.rc-demo-tabs[data-count="5"] .rc-demo-tab, .rc-demo-tabs[data-count="6"] .rc-demo-tab { gap: .3rem; padding: .35rem .3rem; font-size: .75rem; }
.rc-demo-tabs[data-count="6"] .rc-demo-tab { font-size: .7rem; padding: .35rem .2rem; }
@media (min-width: 640px) { .rc-demo-tabs[data-count="5"] .rc-demo-tab svg, .rc-demo-tabs[data-count="6"] .rc-demo-tab svg { display: none; } }       /* five labels in one row: the words need the room */
@media (max-width: 639px) { .rc-demo-tabs[data-count="5"], .rc-demo-tabs[data-count="6"] { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rc-demo-tabs[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rc-demo-tabs[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rc-demo-tabs[data-count="1"] { display: none; }
.rc-demo-tab { position: relative; display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.5rem; padding: .35rem .5rem; overflow: hidden;
  border: 1px solid var(--rc-line); border-radius: .75rem; background: var(--rc-bg); color: var(--rc-ink-2); font: inherit; font-size: .8125rem; font-weight: 600; line-height: 1.1;
  cursor: pointer; transition: border-color .2s ease, background-color .2s ease, color .2s ease; }
.rc-demo-tab svg { width: 1rem; height: 1rem; flex: none; }
.rc-demo-tab span.rc-demo-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-demo-tab:hover { border-color: var(--rc-accent); color: var(--rc-accent); }
.rc-demo-tab:focus-visible, .rc-demo-toggle:focus-visible, .rc-demo-cta:focus-visible { outline: 2px solid var(--rc-accent); outline-offset: 2px; }
.rc-demo-tab[aria-selected="true"] { border-color: var(--rc-accent); background: var(--rc-accent-soft); color: var(--rc-accent); }

/* ---- the stage: a poster, and the film on top of it once it plays ------------------------------------------------------------------------------------------- */
.rc-demo-stage { position: relative; width: 100%; aspect-ratio: var(--demo-frame); overflow: hidden; border: 1px solid var(--rc-line); border-radius: .9rem; background: #fff;
  box-shadow: 0 24px 48px -28px rgba(15, 23, 42, .35); }
html.dark .rc-demo-stage { box-shadow: none; }
.rc-demo-poster, .rc-demo-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #fff; }
.rc-demo-video { opacity: 0; transition: opacity .35s ease; }
.rc-demo-stage.is-playing .rc-demo-video, .rc-demo-stage.is-paused .rc-demo-video { opacity: 1; }
.rc-demo-stage.is-switching .rc-demo-video { opacity: 0; }
.rc-demo-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(15, 23, 42, .12); }
.rc-demo-progress > span { display: block; height: 100%; width: 100%; background: var(--rc-accent); transform: scaleX(0); transform-origin: 0 50%; }

/* ---- footer: play/pause, the "fictitious data" note, the way into the tool --------------------------------------------------------------------------------- */
.rc-demo-foot { display: flex; align-items: center; gap: .6rem; margin-top: .6rem; min-height: 2.5rem; }
.rc-demo-toggle { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border: 1px solid var(--rc-line); border-radius: 9999px;
  background: var(--rc-bg); color: var(--rc-ink); cursor: pointer; transition: border-color .2s ease, color .2s ease; }
.rc-demo-toggle:hover { border-color: var(--rc-accent); color: var(--rc-accent); }
.rc-demo-toggle svg { width: 1rem; height: 1rem; }
.rc-demo-toggle .i-play { display: none; }
.rc-demo-toggle[aria-pressed="true"] .i-play { display: block; }
.rc-demo-toggle[aria-pressed="true"] .i-pause { display: none; }
.rc-demo-note { flex: 1 1 auto; min-width: 0; margin: 0; }
.rc-demo-cta { flex: none; display: inline-flex; align-items: center; gap: .4rem; min-height: 2.5rem; padding: .4rem .9rem; border-radius: .75rem; background: var(--rc-accent); color: var(--rc-on-accent);
  font-size: .8125rem; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background-color .2s ease; }
.rc-demo-cta:hover { background: var(--rc-accent-hover); }
.rc-demo-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---- narrow screens: the same player, tighter; nothing may push the page sideways ---------------------------------------------------------------------------- */
@media (max-width: 639px) {
  .rc-demo-tabs { gap: .25rem; }
  .rc-demo-tab { flex-direction: column; gap: .15rem; min-height: 2.9rem; padding: .3rem .2rem; font-size: .6875rem; }
  .rc-demo-foot { flex-wrap: wrap; }
  .rc-demo-note { order: 3; flex-basis: 100%; }
  .rc-demo-cta { flex: 1 1 auto; justify-content: center; }
}

/* ---- reduced motion: no fade, no autoplay (the script also respects it) ------------------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .rc-demo-video, .rc-demo-tab, .rc-demo-toggle, .rc-demo-cta { transition: none; }
}
