/* ==========================================================================
   DEMOS — Interactive Phone Mockup Styles
   ========================================================================== 
   Defines the physical layout of the simulated phone and the screens 
   for Gmail sync, AI Chat, PDF processing, and Savings Goals.
   ========================================================================== */

/* -----------------------------------------------------------------------
   PHONE CHASSIS
   ----------------------------------------------------------------------- */

.phone-frame {
  width: 320px;
  height: 640px;
  background-color: #1A1C24;
  border: 10px solid #2A2E3D;
  border-radius: 44px;
  box-shadow: var(--fa-shadow-phone);
  position: relative;
  overflow: hidden;
  user-select: none;
  display: flex;
  flex-direction: column;
}

/* Speaker Notch */
.phone-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 24px;
  background-color: #2A2E3D;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
  z-index: 10;
}

/* Screen container */
.phone-frame__screen {
  flex-grow: 1;
  background-color: var(--fa-color-bg);
  border-radius: 34px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  padding-top: 24px; /* Space for notch */
}

/* Status Bar */
.phone-frame__statusbar {
  height: 20px;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--fa-color-text-secondary);
  position: absolute;
  top: 4px;
  width: 100%;
  z-index: 9;
}

.phone-frame__statusbar-icons {
  display: flex;
  gap: 4px;
}

/* -----------------------------------------------------------------------
   COMMON DEMO APP SHELL
   ----------------------------------------------------------------------- */

.demo-screen {
  position: absolute;
  top: 24px;
  left: 0;
  width: 100%;
  height: calc(100% - 24px - 56px); /* Subtract status bar & tabbar */
  background-color: var(--fa-color-bg);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--fa-motion-moderate) ease,
              visibility var(--fa-motion-moderate) ease;
  z-index: 1;
}

.demo-screen--active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

/* App Header inside phone */
.demo-header {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--fa-space-16);
  background-color: var(--fa-color-surface-1);
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  border-bottom: 1px solid rgba(0,74,198,0.04);
}

.demo-header__title {
  font-family: var(--fa-font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--fa-color-text-primary);
}

.demo-header__icon {
  width: 18px;
  height: 18px;
  stroke: var(--fa-color-text-secondary);
  stroke-width: 2;
  fill: none;
}

/* -----------------------------------------------------------------------
   DEMO 1: GMAIL SYNC SCREEN
   ----------------------------------------------------------------------- */

.demo-gmail {
  padding: var(--fa-space-16);
  justify-content: flex-start;
  gap: var(--fa-space-12);
  overflow-y: auto;
}

.demo-gmail__sync-box {
  background-color: var(--fa-color-surface-1);
  border-radius: var(--fa-radius-lg);
  padding: var(--fa-space-20);
  text-align: center;
  box-shadow: var(--fa-shadow-sm);
}

.demo-gmail__sync-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: var(--fa-space-8);
  color: var(--fa-color-text-primary);
}

.demo-gmail__sync-desc {
  font-size: 11px;
  color: var(--fa-color-text-secondary);
  margin-bottom: var(--fa-space-16);
  line-height: 1.4;
}

.demo-gmail__btn {
  width: 100%;
}

/* Transaction List inside Gmail Sync */
.demo-gmail__tx-list {
  display: flex;
  flex-direction: column;
  gap: var(--fa-space-8);
  margin-top: var(--fa-space-8);
}

/* Simulated Transaction Cards: borderless, distinguished by tonal contrast */
.demo-tx {
  background-color: var(--fa-color-surface-1);
  border-radius: var(--fa-radius-md);
  padding: var(--fa-space-12) var(--fa-space-16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--fa-shadow-xs);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--fa-motion-moderate) var(--fa-ease-out),
              transform var(--fa-motion-moderate) var(--fa-ease-out);
}

.demo-tx--animate {
  opacity: 1;
  transform: translateY(0);
}

.demo-tx__left {
  display: flex;
  align-items: center;
  gap: var(--fa-space-12);
}

.demo-tx__icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-tx__icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
  fill: none;
}

.demo-tx__content {
  display: flex;
  flex-direction: column;
}

.demo-tx__title {
  font-size: 12px;
  font-weight: 700;
  color: var(--fa-color-text-primary);
}

.demo-tx__category {
  font-size: 10px;
  color: var(--fa-color-text-secondary);
}

.demo-tx__right {
  text-align: right;
  display: flex;
  flex-direction: column;
}

.demo-tx__amount {
  font-family: var(--fa-font-body);
  font-weight: 700;
  font-size: 13px;
}

.demo-tx__amount--negative {
  color: var(--fa-color-text-primary);
}

.demo-tx__amount--positive {
  color: var(--fa-color-success);
}

.demo-tx__date {
  font-size: 9px;
  color: var(--fa-color-text-tertiary);
}

.demo-gmail__status-badge {
  background-color: var(--fa-color-success-light);
  color: var(--fa-color-success);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--fa-radius-full);
  text-align: center;
  align-self: center;
  opacity: 0;
  transform: scale(0.9);
  transition: all var(--fa-motion-moderate) var(--fa-ease-spring);
  margin-top: 10px;
}

.demo-gmail__status-badge--visible {
  opacity: 1;
  transform: scale(1);
}

/* Spinner */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* -----------------------------------------------------------------------
   DEMO 2: AI CHAT SCREEN
   ----------------------------------------------------------------------- */

.demo-ai {
  background-color: var(--fa-color-surface-2);
}

.demo-ai__chat-area {
  flex-grow: 1;
  padding: var(--fa-space-16);
  display: flex;
  flex-direction: column;
  gap: var(--fa-space-12);
  overflow-y: auto;
  scroll-behavior: smooth;
}

.demo-bubble {
  max-width: 85%;
  padding: var(--fa-space-12) var(--fa-space-16);
  font-size: 12px;
  line-height: 1.5;
  box-shadow: var(--fa-shadow-xs);
}

.demo-bubble--ai {
  background-color: var(--fa-color-surface-1);
  color: var(--fa-color-text-primary);
  border-radius: 18px 18px 18px 4px;
  align-self: flex-start;
  border-left: 3px solid var(--fa-color-ai);
}

.demo-bubble--user {
  background-color: var(--fa-color-primary);
  color: var(--fa-color-text-inverse);
  border-radius: 18px 18px 4px 18px;
  align-self: flex-end;
  opacity: 0;
  transform: translateY(8px);
  transition: all var(--fa-motion-normal) var(--fa-ease-out);
}

.demo-bubble--user.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Suggestions & Inputs */
.demo-ai__suggestions {
  display: flex;
  gap: var(--fa-space-8);
  padding: 0 var(--fa-space-16) var(--fa-space-8);
  overflow-x: auto;
  scrollbar-width: none;
}

.demo-ai__suggestions::-webkit-scrollbar {
  display: none;
}

.demo-ai__chip {
  padding: 6px 12px;
  background-color: var(--fa-color-surface-1);
  border: 1px solid var(--fa-color-surface-3);
  border-radius: var(--fa-radius-full);
  font-size: 10px;
  font-weight: 600;
  color: var(--fa-color-primary);
  white-space: nowrap;
  box-shadow: var(--fa-shadow-xs);
  transition: background-color var(--fa-motion-fast) ease;
}

.demo-ai__chip:hover {
  background-color: var(--fa-color-surface-2);
}

.demo-ai__chip--disabled {
  pointer-events: none;
  opacity: 0.5;
}

.demo-ai__input-bar {
  height: 48px;
  background-color: var(--fa-color-surface-1);
  border-top: 1px solid var(--fa-color-surface-3);
  display: flex;
  align-items: center;
  padding: 0 var(--fa-space-12);
  gap: var(--fa-space-8);
}

.demo-ai__input {
  flex-grow: 1;
  background-color: var(--fa-color-surface-2);
  border-radius: var(--fa-radius-full);
  height: 32px;
  padding: 0 var(--fa-space-16);
  font-size: 11px;
  color: var(--fa-color-text-tertiary);
  display: flex;
  align-items: center;
}

.demo-ai__send {
  width: 32px;
  height: 32px;
  border-radius: var(--fa-radius-full);
  background-color: var(--fa-color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fa-color-text-inverse);
  flex-shrink: 0;
}

/* Typing Dots */
.demo-typing {
  align-self: flex-start;
  background-color: var(--fa-color-surface-1);
  padding: 10px 14px;
  border-radius: 18px 18px 18px 4px;
  display: flex;
  gap: 4px;
  align-items: center;
  box-shadow: var(--fa-shadow-xs);
}

.demo-typing__dot {
  width: 6px;
  height: 6px;
  background-color: var(--fa-color-text-tertiary);
  border-radius: 50%;
  animation: bounceDot 1.4s infinite ease-in-out both;
}

.demo-typing__dot:nth-child(1) { animation-delay: -0.32s; }
.demo-typing__dot:nth-child(2) { animation-delay: -0.16s; }

/* -----------------------------------------------------------------------
   DEMO 3: PDF PROCESSING SCREEN
   ----------------------------------------------------------------------- */

.demo-pdf {
  padding: var(--fa-space-16);
  justify-content: flex-start;
  gap: var(--fa-space-16);
  overflow-y: auto;
}

.demo-pdf__upload-box {
  border: 2px dashed var(--fa-color-primary-hover);
  background-color: var(--fa-color-primary-subtle);
  border-radius: var(--fa-radius-lg);
  padding: var(--fa-space-32) var(--fa-space-16);
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--fa-space-12);
  transition: background-color var(--fa-motion-fast) ease;
  position: relative;
  overflow: hidden;
}

.demo-pdf__upload-box:hover {
  background-color: var(--fa-color-primary-light);
}

.demo-pdf__upload-icon {
  width: 40px;
  height: 40px;
  stroke: var(--fa-color-primary);
  stroke-width: 1.5;
  fill: none;
}

.demo-pdf__upload-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--fa-color-text-primary);
}

.demo-pdf__upload-desc {
  font-size: 10px;
  color: var(--fa-color-text-secondary);
}

/* Laser scanner line */
.demo-pdf__scanner-line {
  display: none;
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, transparent, var(--fa-color-primary), transparent);
  box-shadow: 0 0 8px var(--fa-color-primary);
  z-index: 3;
}

.demo-pdf__upload-box--processing .demo-pdf__scanner-line {
  display: block;
  animation: scanner 2.5s infinite linear;
}

/* Progress bar */
.demo-pdf__progress-bar {
  width: 100%;
  height: 6px;
  background-color: var(--fa-color-surface-3);
  border-radius: var(--fa-radius-full);
  overflow: hidden;
  display: none;
  margin-top: 4px;
}

.demo-pdf__progress-fill {
  height: 100%;
  width: 0%;
  background-color: var(--fa-color-primary);
  border-radius: var(--fa-radius-full);
  transition: width 0.1s linear;
}

/* Results section */
.demo-pdf__results {
  display: none;
  flex-direction: column;
  gap: var(--fa-space-12);
  animation: fadeIn var(--fa-motion-normal) ease forwards;
}

.demo-pdf__results-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--fa-color-text-primary);
  display: flex;
  align-items: center;
  gap: var(--fa-space-8);
}

.demo-pdf__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--fa-space-8);
}

.demo-pdf__stat-card {
  background-color: var(--fa-color-surface-1);
  padding: var(--fa-space-8);
  border-radius: var(--fa-radius-sm);
  text-align: center;
  box-shadow: var(--fa-shadow-xs);
}

.demo-pdf__stat-val {
  font-family: var(--fa-font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--fa-color-primary);
}

.demo-pdf__stat-label {
  font-size: 8px;
  color: var(--fa-color-text-secondary);
  white-space: nowrap;
}

.demo-pdf__stat-card:nth-child(3) .demo-pdf__stat-val {
  color: var(--fa-color-success);
}

/* -----------------------------------------------------------------------
   DEMO 4: SAVINGS GOALS SCREEN
   ----------------------------------------------------------------------- */

.demo-goals {
  padding: var(--fa-space-16);
  justify-content: flex-start;
  gap: var(--fa-space-12);
  overflow-y: auto;
}

.demo-goals__btn {
  width: 100%;
  height: 38px;
  padding: 0;
  font-size: 12px;
  background-color: var(--fa-color-primary-light);
  color: var(--fa-color-primary);
  border-radius: var(--fa-radius-md);
  margin-bottom: var(--fa-space-4);
}

.demo-goals__list {
  display: flex;
  flex-direction: column;
  gap: var(--fa-space-10);
}

/* Goal Card component */
.demo-goal-card {
  background-color: var(--fa-color-surface-1);
  border-radius: var(--fa-radius-md);
  padding: var(--fa-space-12) var(--fa-space-16);
  box-shadow: var(--fa-shadow-xs);
  display: flex;
  flex-direction: column;
  gap: var(--fa-space-8);
  cursor: pointer;
  transition: transform var(--fa-motion-fast) ease;
}

.demo-goal-card:hover {
  transform: translateY(-1px);
}

.demo-goal-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.demo-goal-card__title-row {
  display: flex;
  align-items: center;
  gap: var(--fa-space-8);
}

.demo-goal-card__icon {
  font-size: 14px;
}

.demo-goal-card__title {
  font-size: 12px;
  font-weight: 700;
  color: var(--fa-color-text-primary);
}

.demo-goal-card__pct {
  font-size: 11px;
  font-weight: 700;
  color: var(--fa-color-primary);
}

.demo-goal-card:nth-child(2) .demo-goal-card__pct {
  color: var(--fa-color-ai);
}

.demo-goal-card__bar-bg {
  height: 4px;
  background-color: var(--fa-color-surface-3);
  border-radius: var(--fa-radius-full);
  width: 100%;
  overflow: hidden;
}

.demo-goal-card__bar-fill {
  height: 100%;
  background-color: var(--fa-color-primary);
  border-radius: var(--fa-radius-full);
  width: 0%;
  transition: width 1s var(--fa-ease-out);
}

.demo-goal-card:nth-child(2) .demo-goal-card__bar-fill {
  background-color: var(--fa-color-ai);
}

.demo-goal-card__vals {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--fa-color-text-secondary);
}

/* Expanded contents */
.demo-goal-card__details {
  max-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--fa-space-8);
  transition: max-height var(--fa-motion-moderate) var(--fa-ease-out),
              padding-top var(--fa-motion-moderate) ease;
  border-top: 0px solid rgba(0,0,0,0.04);
}

.demo-goal-card--expanded .demo-goal-card__details {
  max-height: 140px;
  padding-top: var(--fa-space-10);
  border-top-width: 1px;
}

.demo-goal-card__detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--fa-color-text-secondary);
}

.demo-goal-card__detail-val {
  font-weight: 600;
  color: var(--fa-color-text-primary);
}

/* AI recommendation block in phone metas */
.demo-goal-card__ai-rec {
  background-color: var(--fa-color-ai-light);
  border-radius: var(--fa-radius-sm);
  padding: var(--fa-space-8);
  font-size: 9px;
  color: var(--fa-color-ai);
  border-left: 2px solid var(--fa-color-ai);
  line-height: 1.3;
}

/* -----------------------------------------------------------------------
   PHONE BOTTOM TAB BAR (.demo-tabbar)
   ----------------------------------------------------------------------- */

.demo-tabbar {
  height: 56px;
  background-color: var(--fa-color-surface-1);
  border-top: 1px solid var(--fa-color-surface-3);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 10;
}

.demo-tabbar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--fa-color-text-tertiary);
  cursor: pointer;
  gap: 2px;
}

.demo-tabbar__icon {
  width: 18px;
  height: 18px;
  stroke: var(--fa-color-text-tertiary);
  stroke-width: 2;
  fill: none;
}

.demo-tabbar__label {
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Active tab styles */
.demo-tabbar__item--active {
  color: var(--fa-color-primary);
}

.demo-tabbar__item--active .demo-tabbar__icon {
  stroke: var(--fa-color-primary);
}

/* Active AI tab styles */
.demo-tabbar__item--active.demo-tabbar__item--ai {
  color: var(--fa-color-ai);
}

.demo-tabbar__item--active.demo-tabbar__item--ai .demo-tabbar__icon {
  stroke: var(--fa-color-ai);
}

/* ---------------------------------------------------------------
   PHONE THEME — el mockup tiene su propio tema, independiente del sitio.
   Re-scope de tokens: todo lo interno re-resuelve sin tocar componentes.
   --------------------------------------------------------------- */
.phone-frame {
  --phone-bg: var(--fa-color-bg);
  transition: background-color var(--fa-motion-moderate) var(--fa-ease-emphasized);
}
.phone-frame[data-theme='dark'] {
  --fa-color-bg:             var(--fa-color-dark-void);
  --fa-color-surface-0:      var(--fa-color-dark-surface-1);
  --fa-color-surface-1:      var(--fa-color-dark-surface-1);
  --fa-color-surface-2:      var(--fa-color-dark-surface-2);
  --fa-color-surface-3:      var(--fa-color-dark-surface-3);
  --fa-color-text-primary:   var(--fa-color-dark-text-primary);
  --fa-color-text-secondary: var(--fa-color-dark-text-secondary);
  --fa-color-text-tertiary:  #707080;
  /* Dorado canónico de dark mode (DESIGN.md): en oscuro el acento IA vuelve a #D4A03C */
  --fa-color-ai:             #D4A03C;
  --fa-color-ai-light:       rgba(212, 160, 60, 0.12);
  --fa-shadow-xs:            0 1px 3px rgba(0, 0, 0, 0.30);
}

/* Toggle flotante sobre el marco (hermano posicionado FUERA de .phone-frame
   para no heredar el scope oscuro y mantenerse legible). */
.phone-theme-toggle {
  position: absolute;
  top: -14px;
  right: -14px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: var(--fa-radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--fa-color-surface-1);
  box-shadow: var(--fa-shadow-md);
  cursor: pointer;
  border: none;
  color: var(--fa-color-text-secondary);
  transition: transform var(--fa-motion-fast) var(--fa-ease-spring),
              box-shadow var(--fa-motion-fast) ease;
}
.phone-theme-toggle:hover { transform: scale(1.08); box-shadow: var(--fa-shadow-lg); }
.phone-theme-toggle:active { transform: scale(0.94); }
.phone-theme-toggle:focus-visible { outline: 2px solid var(--fa-color-primary); outline-offset: 2px; }
.phone-theme-toggle svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.phone-theme-toggle .icon-sun  { display: none; }
.phone-theme-toggle[aria-pressed='true'] .icon-sun  { display: block; }
.phone-theme-toggle[aria-pressed='true'] .icon-moon { display: none; }

/* Icon chip used by inline SVGs in the phone mockup (hero dashboard,
   Gmail/PDF/Goals transactions, goal cards). Background & color are
   passed inline per use site; this class handles shape + SVG sizing. */
.demo-icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
}
.demo-icon-chip svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==========================================================================
   ASESOR: CHART CARD — donut de gastos por categoría
   Inyectado por demos.js > renderChart() dentro de .demo-bubble--ai
   ========================================================================== */
.demo-ai__chip--chart {
  border-color: var(--fa-color-ai);
  color: var(--fa-color-ai);
}

.demo-chart-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  padding: 10px 12px;
  background-color: var(--fa-color-surface-2);
  border: 1px solid var(--fa-color-surface-3);
  border-radius: 12px;
}
.demo-chart-card__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fa-color-text-tertiary);
}
.demo-chart-card__donut {
  display: flex;
  justify-content: center;
  padding: 4px 0 2px;
}
.demo-chart-card__donut svg,
.hero-mini-donut svg {
  width: 110px;
  height: 110px;
  color: var(--fa-color-text-primary);
}
.demo-chart-card__donut .donut-segment,
.hero-mini-donut .donut-segment {
  fill: none;
  stroke-width: 14;
  stroke-linecap: butt;
  transition: stroke-dashoffset 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.demo-chart-card__donut .donut-center-num,
.hero-mini-donut .donut-center-num {
  fill: currentColor;
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.demo-chart-card__donut .donut-center-lbl,
.hero-mini-donut .donut-center-lbl {
  fill: currentColor;
  opacity: 0.55;
  font-size: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.demo-chart-card__legend {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
}
.demo-chart-card__row {
  display: grid;
  grid-template-columns: 8px 1fr auto auto;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  padding: 2px 4px;
  border-radius: 6px;
}
.demo-chart-card__row--highlight {
  background-color: var(--fa-color-warning-light);
  animation: chart-pulse 2.4s ease-in-out infinite;
}
@keyframes chart-pulse {
  0%, 100% { background-color: var(--fa-color-warning-light); }
  50%      { background-color: rgba(217, 119, 6, 0.22); }
}
.demo-chart-card__dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}
.demo-chart-card__name { color: var(--fa-color-text-primary); font-weight: 500; }
.demo-chart-card__pct  { color: var(--fa-color-text-tertiary); font-variant-numeric: tabular-nums; }
.demo-chart-card__amt  { color: var(--fa-color-text-primary); font-weight: 700; font-variant-numeric: tabular-nums; }
.demo-chart-card__total {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  padding-top: 6px;
  margin-top: 2px;
  border-top: 1px solid var(--fa-color-surface-3);
  color: var(--fa-color-text-primary);
}
@media (prefers-reduced-motion: reduce) {
  .demo-chart-card__row--highlight { animation: none; }
  .demo-chart-card__donut .donut-segment,
  .hero-mini-donut .donut-segment { transition: none; }
}

/* ---------------------------------------------------------------
   HERO PHONE — pantallas navegables + attract loop (hero-phone.js)
   --------------------------------------------------------------- */
.hero-screens {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.hero-screen {
  position: absolute;
  inset: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  opacity: 0;
  transform: translateX(14px);
  pointer-events: none;
  transition: opacity 260ms var(--fa-ease-emphasized),
              transform 260ms var(--fa-ease-emphasized);
}
.hero-screen--active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.hero-screen__title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fa-color-text-tertiary);
}

.hero-mini-donut {
  display: flex;
  justify-content: center;
  padding: 4px 0;
  min-height: 110px;
}

/* Los ítems del tabbar del hero son <button> reales (a11y) —
   neutralizar el estilo UA para que se vean como los divs de features. */
button.demo-tabbar__item {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
}

/* Hint que invita a tocar las pestañas. Aparece a los 2.5s y muere
   con la primera interacción. Decorativo: no captura eventos. */
.hero-tap-hint {
  position: absolute;
  left: 50%;
  bottom: 56px;
  transform: translate(-50%, 6px);
  padding: 6px 14px;
  border-radius: var(--fa-radius-full);
  background: var(--fa-color-surface-1);
  box-shadow: var(--fa-shadow-md);
  font-size: 10px;
  font-weight: 700;
  color: var(--fa-color-text-secondary);
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms var(--fa-ease-emphasized),
              transform 400ms var(--fa-ease-emphasized);
  z-index: 2;
  white-space: nowrap;
}
.hero-tap-hint--visible {
  opacity: 1;
  transform: translate(-50%, 0);
  animation: heroHintPulse 2.4s var(--fa-ease-in-out) 3;
}
@keyframes heroHintPulse {
  0%, 100% { box-shadow: var(--fa-shadow-md); }
  50%      { box-shadow: 0 0 0 6px var(--fa-color-primary-light), var(--fa-shadow-md); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-screen { transition: none; }
  .hero-tap-hint--visible { animation: none; }
}
