/* ----------------------------------------------------------------------------
   ACE NUTRITIONS. — Hoja de Componente 26
   Extraida de `tokens.css` en la Iteracion 07.7 (Regla #011).
   El ORDEN de carga en `app-shell.html` reproduce el del archivo original:
   la cascada CSS depende de el y no debe alterarse.
   -------------------------------------------------------------------------- */
/* ==========================================================================
   PRE-PAINT ROUTE VISIBILITY (EVITA FLASH DE PORTADA EN F5 / CTRL+F5)
   ========================================================================== */
html[data-active-page] .ace-route-view[data-route-page] {
  display: none !important;
}

html[data-active-page='landing'] .ace-route-view[data-route-page='landing'],
html[data-active-page='calculator'] .ace-route-view[data-route-page='calculator'],
html[data-active-page='studio'] .ace-route-view[data-route-page='studio'],
html[data-active-page='tours'] .ace-route-view[data-route-page='tours'],
html[data-active-page='branding'] .ace-route-view[data-route-page='branding'],
html[data-active-page='pricing'] .ace-route-view[data-route-page='pricing'],
html[data-active-page='checkout'] .ace-route-view[data-route-page='checkout'],
html[data-active-page='auth'] .ace-route-view[data-route-page='auth'],
html[data-active-page='auth-register'] .ace-route-view[data-route-page='auth-register'],
html[data-active-page='auth-forgot'] .ace-route-view[data-route-page='auth-forgot'],
html[data-active-page='auth-reset'] .ace-route-view[data-route-page='auth-reset'],
html[data-active-page='faq'] .ace-route-view[data-route-page='faq'],
html[data-active-page='wiki'] .ace-route-view[data-route-page='wiki'] {
  display: block !important;
}

html[data-cz-auth-state='authenticated'] [data-cz-guest-only='true'],
html[data-cz-auth-state='authenticated'] .ace-main-nav [data-cz-route-access='public'] {
  display: none !important;
}

html[data-cz-auth-state='authenticated'] [data-cz-session-cluster='true'],
html[data-cz-auth-state='authenticated'] .ace-topbar > .ace-main-nav > [data-cz-protected-route='true'],
html[data-cz-auth-state='authenticated'] .ace-topbar-actions [data-cz-protected-route='true'] {
  display: inline-flex !important;
}

html[data-cz-auth-state='authenticated'] .ace-dropdown-menu [data-cz-protected-route='true'] {
  display: flex !important;
}

.ace-brand-cluster,
.ace-sidebar-brand-mark,
.ace-sidebar-brand-copy {
  cursor: pointer;
}

/* ==========================================================================
   LINEAR SOFTWARE REA PARITY BLOCKS (1, 2, 3 & 5)
   ========================================================================== */
.ace-vital-signs-strip {
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.ace-vital-signs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.ace-vital-signs-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ace-vital-signs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.ace-label-with-delta {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.ace-site-prev-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: var(--bg-studio);
  color: var(--ink-muted);
}

.ace-site-prev-badge.is-good {
  color: var(--jade);
  border-color: var(--jade);
}

.ace-site-prev-badge.is-warn {
  color: var(--vermilion);
  border-color: var(--vermilion);
}

.ace-prev-consult-strip {
  margin-bottom: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: var(--bg-studio);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.ace-prev-consult-strip-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ace-prev-consult-strip-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.ace-future-deltas-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ace-timeline-sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.ace-timeline-sheet-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.ace-cohort-card {
  margin-top: var(--space-4);
}

.is-active-cohort-row {
  background: var(--bg-studio);
}

@media (max-width: 900px) {
  .ace-vital-signs-grid {
    grid-template-columns: 1fr;
  }

  .ace-future-deltas-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
