/* =========================================================================
   Choose4Choice — app.css
   Augments Tailwind: base reset, design tokens, motion, hand-rolled bits
   ========================================================================= */

:root {
  --brand-50:  #EEF2FF;
  --brand-100: #E0E7FF;
  --brand-400: #818CF8;
  --brand-500: #4F46E5;
  --brand-600: #4338CA;
  --brand-700: #3730A3;

  --success-50:  #ECFDF5;
  --success-500: #10B981;
  --success-700: #047857;

  --warning-50:  #FFFBEB;
  --warning-500: #F59E0B;
  --warning-700: #B45309;

  --danger-50:   #FEF2F2;
  --danger-500:  #EF4444;
  --danger-700:  #B91C1C;

  --ink-50:  #F8FAFC;
  --ink-100: #F1F5F9;
  --ink-200: #E2E8F0;
  --ink-300: #CBD5E1;
  --ink-400: #94A3B8;
  --ink-500: #64748B;
  --ink-700: #334155;
  --ink-900: #0F172A;

  --shadow-card:       0 1px 2px rgba(15, 23, 42, .06);
  --shadow-card-hover: 0 4px 12px rgba(15, 23, 42, .08);
  --shadow-pop:        0 12px 32px rgba(15, 23, 42, .12);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  color: var(--ink-900);
  background: var(--ink-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
code, pre, .mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-weight: 600;
  font-size: .9375rem;
  line-height: 1;
  padding: .625rem 1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 120ms ease-out, border-color 120ms ease-out, transform 120ms ease-out, box-shadow 120ms ease-out;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--brand-500); color: white;
}
.btn-primary:hover { background: var(--brand-600); }
.btn-secondary {
  background: white; color: var(--ink-900); border-color: var(--ink-200);
}
.btn-secondary:hover { background: var(--ink-50); border-color: var(--ink-300); }
.btn-ghost { background: transparent; color: var(--ink-700); }
.btn-ghost:hover { background: var(--ink-100); color: var(--ink-900); }
.btn-danger {
  background: var(--danger-500); color: white;
}
.btn-danger:hover { background: var(--danger-700); }

.btn-sm { padding: .375rem .75rem; font-size: .8125rem; border-radius: 6px; }
.btn-icon { padding: .5rem; width: 36px; height: 36px; }

/* Cards ----------------------------------------------------------------- */
.card {
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}

/* Form inputs ----------------------------------------------------------- */
.input, .textarea, .select {
  width: 100%;
  font-size: .9375rem;
  line-height: 1.4;
  color: var(--ink-900);
  background: white;
  padding: .625rem .75rem;
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  transition: border-color 120ms ease-out, box-shadow 120ms ease-out;
}
.input:hover, .textarea:hover, .select:hover { border-color: var(--ink-300); }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .15);
}
.textarea { min-height: 96px; resize: vertical; }
.label {
  display: block;
  font-weight: 600;
  font-size: .8125rem;
  color: var(--ink-700);
  margin-bottom: .375rem;
}

/* Status pill ----------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .01em;
  padding: .25rem .625rem;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.pill .dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: currentColor;
}

/* Linear progress bar --------------------------------------------------- */
.progress {
  width: 100%;
  height: 8px;
  background: var(--ink-100);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.progress > .bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-500), #6366F1);
  border-radius: 999px;
  width: 0;
  transition: width 800ms cubic-bezier(.2, .8, .2, 1);
}
.progress.is-complete > .bar {
  background: linear-gradient(90deg, var(--success-500), #34D399);
}

/* Stripe shimmer for in-progress */
.progress.is-active > .bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg,
    transparent 25%, rgba(255,255,255,.25) 25%,
    rgba(255,255,255,.25) 50%, transparent 50%,
    transparent 75%, rgba(255,255,255,.25) 75%);
  background-size: 1rem 1rem;
  animation: progress-shimmer 1.6s linear infinite;
}
@keyframes progress-shimmer {
  from { background-position: 0 0; }
  to   { background-position: 1rem 0; }
}

/* =========================================================================
   HERO PROGRESS CARD — the centerpiece of the portal
   ========================================================================= */

.hero-card {
  position: relative;
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.hero-card-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 480px at 95% -15%, rgba(79, 70, 229, .07) 0%, transparent 55%),
    radial-gradient(700px 480px at -10% 115%, rgba(129, 140, 248, .06) 0%, transparent 55%);
}
.hero-card-bg::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(15, 23, 42, 0.045) 1px, transparent 0);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at top right, black, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at top right, black, transparent 75%);
  opacity: 0.7;
}

.hero-card-inner {
  position: relative;
  padding: 1.75rem 1.5rem;
}
@media (min-width: 1024px) {
  .hero-card-inner { padding: 2.25rem 2.5rem; }
}

/* Top region: ring + headline (+ optional project logo) */
.hero-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  align-items: center;
}
@media (min-width: 768px) {
  .hero-top { grid-template-columns: auto 1fr; gap: 2.5rem; }
}
@media (min-width: 1024px) {
  .hero-top.has-logo { grid-template-columns: auto 1fr auto; }
}

/* Project logo tile (right side of hero) ------------------------------ */
.hero-logo {
  display: none;
  width: 120px; height: 120px;
  border-radius: 18px;
  background: white;
  border: 1px solid var(--ink-200);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 12px rgba(15, 23, 42, .04);
  padding: 14px;
  flex-shrink: 0;
  align-self: center;
  justify-self: end;
}
.hero-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
@media (min-width: 1024px) {
  .hero-logo { display: block; }
}

/* The hero ring (with percentage inside) ------------------------------ */
.hero-ring {
  position: relative;
  width: 160px; height: 160px;
  margin: 0 auto;
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .hero-ring { margin: 0; }
}
.hero-ring svg { width: 100%; height: 100%; display: block; }
.hero-ring .ring-track { stroke: var(--ink-100); }
.hero-ring .ring-fill {
  stroke-linecap: round;
  transition: stroke-dashoffset 1100ms cubic-bezier(.16, 1, .3, 1);
  filter: drop-shadow(0 1px 2px rgba(79, 70, 229, .25));
}
.hero-ring.is-complete .ring-fill { stroke: var(--success-500); }
.hero-ring .ring-content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
}
.hero-ring .ring-pct {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink-900);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.hero-ring .ring-pct sup {
  font-size: 1.125rem;
  color: var(--ink-400);
  font-weight: 600;
  margin-left: 1px;
  vertical-align: 0.7em;
}
.hero-ring .ring-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-500);
  margin-top: 0.5rem;
}

/* Right column: status, headline, ETA --------------------------------- */
.hero-headline {
  flex: 1;
  min-width: 0;
}
.hero-pills {
  display: flex; align-items: center; gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.hero-title {
  font-size: 1.875rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--ink-900);
  margin: 0;
}
@media (min-width: 1024px) {
  .hero-title { font-size: 2.25rem; }
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  font-size: 0.9375rem;
  color: var(--ink-600);
}
.hero-meta .eta-date {
  font-weight: 600;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}

/* Countdown pill (greens/reds based on state) */
.countdown-pill {
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.countdown-pill.is-on-track { background: var(--success-50); color: var(--success-700); }
.countdown-pill.is-overdue  { background: var(--danger-50);  color: var(--danger-700);  }
.countdown-pill.is-tight    { background: var(--warning-50); color: var(--warning-700); }
.countdown-pill .pulse {
  width: 6px; height: 6px; border-radius: 999px;
  background: currentColor;
  position: relative;
}
.countdown-pill .pulse::after {
  content: '';
  position: absolute; inset: -3px;
  border-radius: 999px;
  border: 2px solid currentColor;
  opacity: 0;
  animation: pulse-out 2.4s ease-out infinite;
}
@keyframes pulse-out {
  0%   { opacity: 0.4; transform: scale(0.7); }
  80%  { opacity: 0;   transform: scale(1.6); }
  100% { opacity: 0;   transform: scale(1.6); }
}

/* KPI strip ------------------------------------------------------------ */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink-200);
}
@media (min-width: 768px) {
  .kpi-strip { grid-template-columns: repeat(4, 1fr); gap: 0; }
  .kpi-strip > .kpi + .kpi {
    border-left: 1px solid var(--ink-200);
    padding-left: 1.5rem;
  }
}
.kpi {
  display: flex; flex-direction: column; gap: 0.5rem;
  min-width: 0;
}
.kpi-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-500);
}
.kpi-value {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink-900);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  min-width: 0;
}
.kpi-value .kpi-suffix {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-500);
  letter-spacing: 0;
}
.kpi-value .truncate-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Refined milestone stepper ------------------------------------------- */
.stepper-wrap {
  margin-top: 1.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--ink-200);
}
.stepper-eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-500);
  margin-bottom: 1rem;
}
.stepper {
  display: flex;
  align-items: flex-start;
  list-style: none;
  padding: 0; margin: 0;
}
.step {
  flex: 1;
  position: relative;
  text-align: center;
  min-width: 0;
}
.step-marker {
  width: 32px; height: 32px;
  border-radius: 999px;
  background: white;
  border: 2px solid var(--ink-200);
  display: grid; place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-400);
  margin: 0 auto;
  position: relative;
  z-index: 2;
  transition: transform 200ms cubic-bezier(.2, .8, .2, 1);
}
.step-meta { margin-top: 0.625rem; padding: 0 0.25rem; }
.step-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-700);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.step-date {
  font-size: 0.6875rem;
  color: var(--ink-400);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
  white-space: nowrap;
}

/* Connector line between steps */
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 15px;
  left: calc(50% + 18px);
  right: calc(-50% + 18px);
  height: 2px;
  background: var(--ink-200);
  z-index: 1;
}

.step.is-complete .step-marker {
  background: var(--success-500);
  border-color: var(--success-500);
  color: white;
}
.step.is-complete .step-title { color: var(--ink-900); }
.step.is-complete .step-date  { color: var(--ink-500); }
.step.is-complete:not(:last-child)::after { background: var(--success-500); }

.step.is-active .step-marker {
  background: var(--brand-500);
  border-color: var(--brand-500);
  color: white;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, .15);
}
.step.is-active .step-title { color: var(--ink-900); }
.step.is-active .step-date  { color: var(--brand-700); font-weight: 600; }
.step.is-active .step-marker::before {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 999px;
  border: 2px solid var(--brand-500);
  opacity: 0;
  animation: ring-pulse 2.6s ease-out infinite;
}
@keyframes ring-pulse {
  0%   { opacity: 0;   transform: scale(0.7); }
  60%  { opacity: 0.35; }
  100% { opacity: 0;   transform: scale(1.55); }
}

/* Mobile: vertical stepper */
@media (max-width: 767px) {
  .stepper { flex-direction: column; gap: 0; }
  .step {
    flex: none;
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 0.875rem;
    text-align: left;
    padding: 0.5rem 0;
    align-items: center;
  }
  .step-meta { margin-top: 0; padding: 0; }
  .step-title { white-space: normal; }
  .step:not(:last-child)::after {
    top: 32px; bottom: -8px;
    left: 15px; right: auto;
    width: 2px; height: auto;
  }
}

/* Empty state ----------------------------------------------------------- */
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
  border: 2px dashed var(--ink-200);
  border-radius: 16px;
  background: white;
}
.empty .icon {
  width: 64px; height: 64px; border-radius: 999px;
  background: var(--brand-50); color: var(--brand-500);
  display: grid; place-items: center;
  margin-bottom: 1rem;
}

/* Sidebar nav ----------------------------------------------------------- */
.sidenav a {
  display: flex; align-items: center; gap: .625rem;
  padding: .5rem .75rem;
  border-radius: 8px;
  color: var(--ink-700);
  font-size: .9375rem;
  font-weight: 500;
  transition: background-color 120ms ease-out, color 120ms ease-out;
}
.sidenav a:hover { background: var(--ink-100); color: var(--ink-900); }
.sidenav a.is-active {
  background: var(--brand-50);
  color: var(--brand-700);
  font-weight: 600;
}
.sidenav a.is-active svg { color: var(--brand-500); }

/* Top nav (portal) ------------------------------------------------------ */
.topnav a.tab {
  position: relative;
  font-size: .9375rem;
  color: var(--ink-500);
  font-weight: 500;
  padding: 1.25rem 0;
}
.topnav a.tab:hover { color: var(--ink-900); }
.topnav a.tab.is-active {
  color: var(--ink-900);
  font-weight: 600;
}
.topnav a.tab.is-active::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--brand-500);
  border-radius: 2px;
}

/* Tabs (under hero) ------------------------------------------------------ */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--ink-200);
  gap: 1.25rem;
}
.tabs a {
  padding: .75rem 0;
  margin-bottom: -1px;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--ink-500);
  border-bottom: 2px solid transparent;
  transition: color 120ms ease-out, border-color 120ms ease-out;
}
.tabs a:hover { color: var(--ink-900); }
.tabs a.is-active {
  color: var(--brand-700);
  border-color: var(--brand-500);
  font-weight: 600;
}

/* Avatar --------------------------------------------------------------- */
.avatar {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 999px;
  display: grid; place-items: center;
  color: white;
  font-weight: 600;
  font-size: .8125rem;
  letter-spacing: .02em;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.avatar.sm { width: 24px; height: 24px; font-size: .6875rem; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.125rem; }
.avatar.xl { width: 96px; height: 96px; font-size: 1.875rem; }
.avatar.xxl { width: 128px; height: 128px; font-size: 2.5rem; }
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* Specialty chips ------------------------------------------------------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
}
.chip {
  display: inline-flex; align-items: center;
  font-size: .75rem;
  font-weight: 500;
  color: var(--ink-700);
  background: var(--ink-100);
  padding: .25rem .625rem;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: -0.005em;
}
.chip.chip-brand   { background: var(--brand-50);   color: var(--brand-700); }
.chip.chip-success { background: var(--success-50); color: var(--success-700); }

/* Color-swatch picker -------------------------------------------------- */
.swatches {
  display: flex; gap: .5rem; flex-wrap: wrap;
}
.swatches input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.swatches label {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  transition: transform 120ms ease-out, box-shadow 120ms ease-out;
}
.swatches label:hover { transform: scale(1.08); }
.swatches input:checked + label,
.swatches label.is-checked {
  box-shadow: 0 0 0 2px white, 0 0 0 4px var(--ink-900);
}
.swatches label::after {
  content: '';
  display: block;
  width: 14px; height: 14px;
  border-radius: 999px;
  background: white;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 120ms ease-out, transform 120ms ease-out;
}
.swatches input:checked + label::after,
.swatches label.is-checked::after {
  opacity: 1;
  transform: scale(1);
}

/* Photo upload zone ---------------------------------------------------- */
.photo-zone {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.photo-zone .photo-preview {
  width: 96px; height: 96px;
  border-radius: 999px;
  border: 1px dashed var(--ink-300);
  background: var(--ink-50);
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.photo-zone .photo-preview .placeholder {
  color: var(--ink-400);
}
.photo-zone .photo-preview img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.photo-zone .photo-controls {
  flex: 1;
  min-width: 0;
}
.photo-zone input[type="file"] {
  display: none;
}

/* Member card on /admin/team — premium profile style with color hero strip
   and overlapping photo. -------------------------------------------------- */
.member-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 160ms ease-out, box-shadow 200ms ease-out, transform 200ms ease-out;
  min-height: 280px;
}
.member-card:hover {
  transform: translateY(-2px);
  border-color: var(--ink-300);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .10);
}

/* Color hero strip (uses the member's avatar_color via inline style) */
.member-card__hero {
  position: relative;
  height: 64px;
  flex-shrink: 0;
}
.member-card__hero::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(255,255,255,.28), transparent 55%),
    radial-gradient(80% 100% at 0% 100%, rgba(0,0,0,.18), transparent 60%);
}
.member-card__hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.18) 1px, transparent 0);
  background-size: 14px 14px;
  opacity: 0.6;
}

/* Photo overlapping the hero */
.member-card__photo {
  margin: -42px auto 0;
  width: 88px; height: 88px;
  border-radius: 999px;
  border: 4px solid white;
  background: white;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .12);
  overflow: hidden;
}
.member-card__photo .avatar {
  width: 100%; height: 100%;
  font-size: 1.5rem;
  box-shadow: none;
}

/* Body */
.member-card__body {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.875rem 1.25rem 1.25rem;
}
.member-card__name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink-900);
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.member-card__title {
  font-size: 0.8125rem;
  color: var(--ink-500);
  margin-top: 0.25rem;
  line-height: 1.4;
}

/* Specialty chips inside the card — wrap nicely, max 2 lines */
.member-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  justify-content: center;
  margin-top: 1rem;
  max-height: 60px;
  overflow: hidden;
  width: 100%;
}

/* Footer pinned to the bottom */
.member-card__footer {
  margin-top: auto;
  padding-top: 1rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  font-size: 0.75rem;
  color: var(--ink-500);
  border-top: 1px solid var(--ink-100);
}
.member-card__metric {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-weight: 500;
  color: var(--ink-700);
}
.member-card__metric strong {
  font-weight: 700;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}
.member-card__email {
  color: var(--ink-500);
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* "+N more" chip variant */
.chip.chip-more {
  background: white;
  border: 1px dashed var(--ink-300);
  color: var(--ink-500);
}

/* Reusable destructive icon button --------------------------------- */
.icon-btn-danger {
  width: 32px; height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  border: 1px solid rgba(15, 23, 42, .08);
  color: var(--ink-600);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background-color 120ms ease-out, border-color 120ms ease-out, color 120ms ease-out, box-shadow 120ms ease-out, transform 120ms ease-out;
}
.icon-btn-danger:hover {
  background: white;
  color: var(--danger-600);
  border-color: var(--danger-200);
  box-shadow: 0 4px 14px rgba(239, 68, 68, .25);
  transform: scale(1.05);
}
.icon-btn-danger:active { transform: scale(0.96); }
.icon-btn-danger:focus-visible {
  outline: 2px solid var(--danger-500);
  outline-offset: 2px;
}

/* Member tile = card + hover-revealed actions overlay --------------- */
.member-tile { position: relative; }
.member-tile__delete {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 160ms ease-out, transform 160ms ease-out;
  pointer-events: none;
}
.member-tile:hover .member-tile__delete,
.member-tile__delete:focus-within {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Table-row hover-reveal action ------------------------------------- */
.row-action {
  width: 56px;
  text-align: right;
}
.row-action__form {
  display: inline-flex;
  opacity: 0;
  transform: translateX(4px);
  transition: opacity 160ms ease-out, transform 160ms ease-out;
  pointer-events: none;
}
tr:hover .row-action__form,
.row-action__form:focus-within {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

/* On touch devices the hover-revealed actions are always visible */
@media (hover: none) {
  .member-tile__delete,
  .row-action__form {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}

/* Toast / Flash --------------------------------------------------------- */
.toast {
  display: flex; align-items: center; gap: .625rem;
  padding: .75rem 1rem;
  border-radius: 10px;
  border: 1px solid;
  font-size: .9375rem;
  font-weight: 500;
  background: white;
  box-shadow: var(--shadow-card-hover);
}
.toast-success { border-color: #A7F3D0; color: var(--success-700); background: var(--success-50); }
.toast-error   { border-color: #FECACA; color: var(--danger-700); background: var(--danger-50); }
.toast-info    { border-color: var(--brand-100); color: var(--brand-700); background: var(--brand-50); }

/* Update card ----------------------------------------------------------- */
.update {
  position: relative;
  border: 1px solid var(--ink-200);
  border-radius: 12px;
  background: white;
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  transition: box-shadow 160ms ease-out, border-color 160ms ease-out, transform 160ms ease-out;
}
.update:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--ink-300);
}
.update::before {
  content: '';
  position: absolute;
  left: 0; top: 1rem; bottom: 1rem;
  width: 3px;
  border-radius: 999px;
  background: var(--ink-200);
}
.update.tag-design       ::before, .update.tag-design::before       { background: var(--brand-500); }
.update.tag-milestone    ::before, .update.tag-milestone::before    { background: var(--success-500); }
.update.tag-question     ::before, .update.tag-question::before     { background: var(--warning-500); }
.update.tag-code         ::before, .update.tag-code::before         { background: var(--ink-700); }
.update.tag-announcement ::before, .update.tag-announcement::before { background: var(--brand-400); }

/* Section headers in feed --------------------------------------------- */
.section-eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-500);
}

/* Task row -------------------------------------------------------------- */
.task-row {
  display: flex; align-items: center; gap: .75rem;
  padding: .625rem .75rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background-color 120ms ease-out, border-color 120ms ease-out;
}
.task-row:hover { background: var(--ink-50); }
.task-row.is-complete .task-title {
  color: var(--ink-400);
  text-decoration: line-through;
}

/* Pretty checkboxes (read-only for clients) */
.tcheck {
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--ink-300);
  background: white;
  display: grid; place-items: center;
  color: white;
  flex-shrink: 0;
  transition: all 120ms ease-out;
}
.tcheck.is-complete { background: var(--success-500); border-color: var(--success-500); }
.tcheck.is-progress { border-color: var(--brand-500); background: white; }
.tcheck.is-progress::after {
  content: ''; width: 8px; height: 8px; border-radius: 999px; background: var(--brand-500);
  animation: pulse 1.6s ease-in-out infinite;
}
.tcheck.is-blocked { border-color: var(--danger-500); }
.tcheck.is-blocked::after { content: '!'; color: var(--danger-500); font-weight: 800; font-size: 14px; line-height: 1; }
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(.6); opacity: .6; }
}

/* Auth split layout ----------------------------------------------------- */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
  .auth-shell { grid-template-columns: 1fr 1fr; }
}
.auth-side {
  display: none;
  position: relative;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(129,140,248,.35), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(99,102,241,.35), transparent 60%),
    linear-gradient(135deg, #312E81 0%, #4338CA 50%, #6366F1 100%);
  color: white;
}
@media (min-width: 1024px) {
  .auth-side { display: flex; flex-direction: column; justify-content: space-between; padding: 3rem; }
}

/* Subtle grid for auth side */
.auth-side::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* =========================================================================
   AI summary card (subtle, premium "smart" feel — sits below the hero)
   ========================================================================= */
.ai-summary {
  position: relative;
  background:
    radial-gradient(80% 100% at 0% 0%, rgba(129,140,248,.10), transparent 60%),
    linear-gradient(135deg, #FAFBFF 0%, #FFFFFF 60%);
  border: 1px solid var(--brand-100);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  overflow: hidden;
}
.ai-summary::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(79,70,229,.06) 1px, transparent 0);
  background-size: 14px 14px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at top right, black, transparent 80%);
          mask-image: radial-gradient(ellipse 70% 60% at top right, black, transparent 80%);
  pointer-events: none;
  opacity: .8;
}
.ai-summary__header {
  position: relative;
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: .625rem;
}
.ai-summary__icon {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-400));
  color: white;
}
.ai-summary__label {
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-700);
}
.ai-summary__time {
  font-size: .6875rem;
  color: var(--ink-400);
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}
.ai-summary__text {
  position: relative;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-800);
  letter-spacing: -0.005em;
  margin: 0;
}

/* =========================================================================
   AI floating chat widget
   ========================================================================= */
.ai-widget {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 80;
}
.ai-widget__toggle {
  width: 56px; height: 56px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-500), #6366F1 50%, var(--brand-400));
  color: white;
  border: none;
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(79, 70, 229, .35), 0 1px 2px rgba(15, 23, 42, .1);
  transition: transform 200ms cubic-bezier(.2, .8, .2, 1), box-shadow 200ms ease-out;
  position: relative;
}
.ai-widget__toggle:hover { transform: scale(1.06); box-shadow: 0 10px 28px rgba(79, 70, 229, .4); }
.ai-widget__toggle:active { transform: scale(0.96); }
.ai-widget__icon-close { display: none; }
.ai-widget.is-open .ai-widget__icon-open  { display: none; }
.ai-widget.is-open .ai-widget__icon-close { display: block; }

/* Subtle pulsing halo on the toggle to invite attention (only when closed) */
.ai-widget__toggle::after {
  content: '';
  position: absolute; inset: -2px;
  border-radius: 999px;
  border: 2px solid rgba(99,102,241,.5);
  opacity: 0;
  animation: ai-halo 3s ease-out infinite;
}
.ai-widget.is-open .ai-widget__toggle::after { animation: none; opacity: 0; }
@keyframes ai-halo {
  0%   { opacity: 0;  transform: scale(.8); }
  60%  { opacity: .35; }
  100% { opacity: 0;  transform: scale(1.4); }
}

.ai-widget__panel {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 380px;
  max-width: calc(100vw - 40px);
  height: 540px;
  max-height: calc(100vh - 120px);
  background: white;
  border-radius: 16px;
  border: 1px solid var(--ink-200);
  box-shadow: 0 24px 60px rgba(15, 23, 42, .18), 0 4px 14px rgba(15, 23, 42, .08);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: ai-pop 200ms cubic-bezier(.2, .8, .2, 1);
}
@keyframes ai-pop {
  0%   { opacity: 0; transform: translateY(8px) scale(.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-widget__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--ink-200);
  background: white;
}
.ai-widget__avatar {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-400));
  color: white;
  display: grid; place-items: center;
}
.ai-widget__hdr-close {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: transparent; border: none;
  color: var(--ink-500);
  display: grid; place-items: center; cursor: pointer;
  transition: background-color 120ms ease-out, color 120ms ease-out;
}
.ai-widget__hdr-close:hover { background: var(--ink-100); color: var(--ink-900); }

.ai-widget__messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex; flex-direction: column; gap: 0.625rem;
  background: var(--ink-50);
}

.ai-msg { display: flex; max-width: 100%; }
.ai-msg__bubble {
  max-width: 85%;
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 0.625rem 0.875rem;
  border-radius: 14px;
  white-space: pre-wrap;
  word-wrap: break-word;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.ai-msg--ai { justify-content: flex-start; }
.ai-msg--ai .ai-msg__bubble {
  background: white;
  border: 1px solid var(--ink-200);
  color: var(--ink-800);
  border-bottom-left-radius: 4px;
}
.ai-msg--user { justify-content: flex-end; }
.ai-msg--user .ai-msg__bubble {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-400));
  color: white;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 6px rgba(79, 70, 229, .25);
}

.ai-msg--thinking .ai-msg__bubble { display: inline-flex; gap: 4px; padding: 0.875rem 1rem; }
.ai-msg--thinking .dot {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--ink-400);
  animation: ai-dot 1.2s ease-in-out infinite;
}
.ai-msg--thinking .dot:nth-child(2) { animation-delay: .15s; }
.ai-msg--thinking .dot:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot {
  0%, 80%, 100% { opacity: .25; transform: translateY(0); }
  40%           { opacity: 1;   transform: translateY(-3px); }
}

.ai-widget__suggestions {
  display: flex; flex-direction: column; gap: 0.375rem;
  margin-top: 0.5rem;
}
.ai-suggestion {
  text-align: left;
  font-size: 0.8125rem;
  padding: 0.5rem 0.75rem;
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: 10px;
  color: var(--ink-700);
  cursor: pointer;
  transition: background-color 120ms ease-out, border-color 120ms ease-out, color 120ms ease-out;
}
.ai-suggestion:hover {
  background: var(--brand-50);
  border-color: var(--brand-200);
  color: var(--brand-700);
}

.ai-widget__form {
  display: flex; gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  border-top: 1px solid var(--ink-200);
  background: white;
}
.ai-widget__form input[type="text"] {
  flex: 1;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--ink-200);
  border-radius: 10px;
  background: var(--ink-50);
  outline: none;
  transition: border-color 120ms ease-out, box-shadow 120ms ease-out, background-color 120ms ease-out;
}
.ai-widget__form input[type="text"]:focus {
  border-color: var(--brand-500);
  background: white;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .15);
}
.ai-widget__send {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--brand-500);
  color: white;
  border: none;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background-color 120ms ease-out, transform 120ms ease-out;
}
.ai-widget__send:hover  { background: var(--brand-600); }
.ai-widget__send:active { transform: scale(.95); }
.ai-widget__send:disabled { background: var(--ink-300); cursor: not-allowed; }
.ai-widget__footer {
  padding: 0.5rem 1rem 0.875rem;
  font-size: 0.6875rem;
  color: var(--ink-400);
  text-align: center;
  background: white;
}

/* On small screens make the panel near-fullscreen */
@media (max-width: 640px) {
  .ai-widget__panel {
    position: fixed;
    bottom: 84px;
    right: 12px; left: 12px;
    width: auto;
    height: 70vh;
  }
}

/* =========================================================================
   Quill (snow theme) — make it match our design system
   ========================================================================= */
.wysiwyg-host {
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 120ms ease-out, box-shadow 120ms ease-out;
}
.wysiwyg-host:focus-within {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .15);
}
.wysiwyg-host.is-invalid {
  border-color: var(--danger-500);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .12);
}
.wysiwyg-host .ql-toolbar.ql-snow {
  border: 0;
  border-bottom: 1px solid var(--ink-200);
  padding: 6px 8px;
  background: var(--ink-50);
}
.wysiwyg-host .ql-toolbar.ql-snow .ql-formats { margin-right: 10px; }
.wysiwyg-host .ql-toolbar.ql-snow button {
  border-radius: 6px;
  width: 28px; height: 28px;
}
.wysiwyg-host .ql-toolbar.ql-snow button:hover { background: var(--ink-100); }
.wysiwyg-host .ql-toolbar.ql-snow .ql-active {
  background: var(--brand-50);
  color: var(--brand-700);
}
.wysiwyg-host .ql-toolbar.ql-snow .ql-stroke         { stroke: var(--ink-700); }
.wysiwyg-host .ql-toolbar.ql-snow .ql-fill           { fill: var(--ink-700); }
.wysiwyg-host .ql-toolbar.ql-snow button:hover .ql-stroke,
.wysiwyg-host .ql-toolbar.ql-snow .ql-active .ql-stroke { stroke: var(--brand-700); }
.wysiwyg-host .ql-toolbar.ql-snow button:hover .ql-fill,
.wysiwyg-host .ql-toolbar.ql-snow .ql-active .ql-fill   { fill: var(--brand-700); }
.wysiwyg-host .ql-container.ql-snow {
  border: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.6;
}
.wysiwyg-host .ql-editor {
  min-height: 100px;
  padding: 12px 14px;
  color: var(--ink-900);
}
.wysiwyg-host .ql-editor.ql-blank::before {
  font-style: normal;
  color: var(--ink-400);
  left: 14px;
  right: 14px;
}
/* Make Quill's tooltip match our style */
.ql-snow .ql-tooltip { border-radius: 8px !important; box-shadow: var(--shadow-pop) !important; }

/* Honor reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* =========================================================================
   Sortable milestones (admin Tasks tab)
   ========================================================================= */
.drag-handle {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: var(--ink-300);
  cursor: grab;
  flex-shrink: 0;
  transition: color 120ms ease-out, background-color 120ms ease-out;
  user-select: none;
  -webkit-user-select: none;
}
.drag-handle:hover {
  color: var(--ink-700);
  background: var(--ink-100);
}
.drag-handle:active { cursor: grabbing; }

[data-milestones-sortable] { position: relative; }
.milestone-tile { transition: opacity 140ms ease-out, box-shadow 140ms ease-out; }
.milestone-tile.is-dragging {
  opacity: 0.45;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .14);
}
[data-milestones-sortable].is-saving { opacity: 0.85; pointer-events: none; }

/* =========================================================================
   Demo reveal — celebration popup, modal player, confetti canvas
   ========================================================================= */
.demo-reveal { position: relative; z-index: 90; }

body.no-scroll { overflow: hidden; }

/* Teaser popup — center-stage card that grabs attention on first reveal */
.demo-teaser {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 12px));
  width: min(420px, calc(100vw - 32px));
  background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
  border: 1px solid var(--brand-100, #e0e7ff);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .18), 0 4px 12px rgba(79, 70, 229, .12);
  text-align: center;
  z-index: 95;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease-out, transform 220ms cubic-bezier(.16, 1, .3, 1);
}
.demo-teaser.is-open {
  opacity: 1;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}
.demo-teaser__sparkle {
  display: inline-grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 999px;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-400) 100%);
  color: white;
  box-shadow: 0 6px 18px rgba(79, 70, 229, .35);
}
.demo-teaser__eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-600, #4338CA);
  margin-bottom: 6px;
}
.demo-teaser__title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  line-height: 1.2;
  margin: 0 0 6px;
}
.demo-teaser__sub {
  color: var(--ink-600);
  font-size: 14px;
  margin: 0 0 18px;
}
.demo-teaser__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* Modal player */
.demo-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 180ms ease-out;
}
.demo-modal.is-open { opacity: 1; }
.demo-modal[hidden] { display: none; }
.demo-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .72);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.demo-modal__panel {
  position: relative;
  width: min(900px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  background: white;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(8px);
  transition: transform 220ms cubic-bezier(.16, 1, .3, 1);
}
.demo-modal.is-open .demo-modal__panel { transform: translateY(0); }
.demo-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px; height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--ink-200);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink-700);
  transition: background-color 120ms, color 120ms, transform 120ms;
}
.demo-modal__close:hover { background: white; color: var(--ink-900); transform: scale(1.05); }
.demo-modal__header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--ink-100);
  display: flex;
  align-items: center;
  gap: 10px;
}
.demo-modal__pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--brand-50, #eef2ff);
  color: var(--brand-700, #4338CA);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.demo-modal__title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink-900);
  margin: 0;
  line-height: 1.3;
}
.demo-modal__player {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
  width: 100%;
}
.demo-modal__player iframe,
.demo-modal__player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.demo-modal__nopreview {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255, 255, 255, .8);
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  text-align: center;
  padding: 24px;
}
.demo-modal__nopreview p { margin: 0; max-width: 420px; }
.demo-modal__footer {
  padding: 14px 20px;
  border-top: 1px solid var(--ink-100);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: var(--ink-50, #f8fafc);
}

/* Inline player on the persistent demos card */
.demo-card__player {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
}
.demo-card__player iframe,
.demo-card__player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Confetti canvas — rides above the modal during the burst */
.demo-confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
}

/* Mobile: shrink padding, full-width modal */
@media (max-width: 640px) {
  .demo-teaser { padding: 22px 18px; }
  .demo-teaser__title { font-size: 1.25rem; }
  .demo-modal__panel { width: calc(100vw - 12px); border-radius: 12px; }
  .demo-modal__footer { flex-wrap: wrap; }
}
